19030 lines
771 KiB
VB.net
19030 lines
771 KiB
VB.net
'' ------------------------------------------------------------------------------
|
|
'' <auto-generated>
|
|
'' Generated by Xsd2Code. Version 3.4.1.33667 Microsoft Reciprocal License (Ms-RL)
|
|
'' <NameSpace>FCFCDF</NameSpace><Collection>List</Collection><codeType>VisualBasic</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net20</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>False</GenerateXMLAttributes><OrderXMLAttrib>False</OrderXMLAttrib><EnableEncoding>False</EnableEncoding><AutomaticProperties>False</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>False</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>False</ExcludeIncludedTypes><EnableInitializeFields>True</EnableInitializeFields>
|
|
'' </auto-generated>
|
|
'' ------------------------------------------------------------------------------
|
|
Imports System
|
|
Imports System.Diagnostics
|
|
Imports System.Xml.Serialization
|
|
Imports System.Collections
|
|
Imports System.Xml.Schema
|
|
Imports System.ComponentModel
|
|
Imports System.IO
|
|
Imports System.Text
|
|
Imports System.Collections.Generic
|
|
|
|
Namespace FCFCDF
|
|
|
|
Partial Public Class FCFCDF
|
|
|
|
Private metaDataField As FCFCDFMetaData
|
|
|
|
Private headerField As FCFCDFHeader
|
|
|
|
Private declarantField As FCFCDFDeclarant
|
|
|
|
Private representativeField As FCFCDFRepresentative
|
|
|
|
Private principalField As FCFCDFPrincipal
|
|
|
|
Private contactPersonField As FCFCDFContactPerson
|
|
|
|
Private dutyDefermentApprovalField As List(Of FCFCDFDutyDefermentApproval)
|
|
|
|
Private borderTransportMeansField As FCFCDFBorderTransportMeans
|
|
|
|
Private arrivalTransportMeansField As FCFCDFArrivalTransportMeans
|
|
|
|
Private previousAdministrativeReferencesField As FCFCDFPreviousAdministrativeReferences
|
|
|
|
Private summaryDeclarationField As FCFCDFSummaryDeclaration
|
|
|
|
Private customsWarehouseField As FCFCDFCustomsWarehouse
|
|
|
|
Private inwardProcessingField As FCFCDFInwardProcessing
|
|
|
|
Private bodyField As FCFCDFBody
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.bodyField = New FCFCDFBody()
|
|
Me.inwardProcessingField = New FCFCDFInwardProcessing()
|
|
Me.customsWarehouseField = New FCFCDFCustomsWarehouse()
|
|
Me.summaryDeclarationField = New FCFCDFSummaryDeclaration()
|
|
Me.previousAdministrativeReferencesField = New FCFCDFPreviousAdministrativeReferences()
|
|
Me.arrivalTransportMeansField = New FCFCDFArrivalTransportMeans()
|
|
Me.borderTransportMeansField = New FCFCDFBorderTransportMeans()
|
|
Me.dutyDefermentApprovalField = New List(Of FCFCDFDutyDefermentApproval)()
|
|
Me.contactPersonField = New FCFCDFContactPerson()
|
|
Me.principalField = New FCFCDFPrincipal()
|
|
Me.representativeField = New FCFCDFRepresentative()
|
|
Me.declarantField = New FCFCDFDeclarant()
|
|
Me.headerField = New FCFCDFHeader()
|
|
Me.metaDataField = New FCFCDFMetaData()
|
|
End Sub
|
|
|
|
Public Property MetaData() As FCFCDFMetaData
|
|
Get
|
|
Return Me.metaDataField
|
|
End Get
|
|
Set
|
|
Me.metaDataField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Header() As FCFCDFHeader
|
|
Get
|
|
Return Me.headerField
|
|
End Get
|
|
Set
|
|
Me.headerField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Declarant() As FCFCDFDeclarant
|
|
Get
|
|
Return Me.declarantField
|
|
End Get
|
|
Set
|
|
Me.declarantField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Representative() As FCFCDFRepresentative
|
|
Get
|
|
Return Me.representativeField
|
|
End Get
|
|
Set
|
|
Me.representativeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Principal() As FCFCDFPrincipal
|
|
Get
|
|
Return Me.principalField
|
|
End Get
|
|
Set
|
|
Me.principalField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ContactPerson() As FCFCDFContactPerson
|
|
Get
|
|
Return Me.contactPersonField
|
|
End Get
|
|
Set
|
|
Me.contactPersonField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DutyDefermentApproval() As List(Of FCFCDFDutyDefermentApproval)
|
|
Get
|
|
Return Me.dutyDefermentApprovalField
|
|
End Get
|
|
Set
|
|
Me.dutyDefermentApprovalField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property BorderTransportMeans() As FCFCDFBorderTransportMeans
|
|
Get
|
|
Return Me.borderTransportMeansField
|
|
End Get
|
|
Set
|
|
Me.borderTransportMeansField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ArrivalTransportMeans() As FCFCDFArrivalTransportMeans
|
|
Get
|
|
Return Me.arrivalTransportMeansField
|
|
End Get
|
|
Set
|
|
Me.arrivalTransportMeansField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PreviousAdministrativeReferences() As FCFCDFPreviousAdministrativeReferences
|
|
Get
|
|
Return Me.previousAdministrativeReferencesField
|
|
End Get
|
|
Set
|
|
Me.previousAdministrativeReferencesField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SummaryDeclaration() As FCFCDFSummaryDeclaration
|
|
Get
|
|
Return Me.summaryDeclarationField
|
|
End Get
|
|
Set
|
|
Me.summaryDeclarationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CustomsWarehouse() As FCFCDFCustomsWarehouse
|
|
Get
|
|
Return Me.customsWarehouseField
|
|
End Get
|
|
Set
|
|
Me.customsWarehouseField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property InwardProcessing() As FCFCDFInwardProcessing
|
|
Get
|
|
Return Me.inwardProcessingField
|
|
End Get
|
|
Set
|
|
Me.inwardProcessingField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Body() As FCFCDFBody
|
|
Get
|
|
Return Me.bodyField
|
|
End Get
|
|
Set
|
|
Me.bodyField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDF))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDF object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDF object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDF object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDF, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDF)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDF) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDF
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDF)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDF 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDF object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDF object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDF, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDF)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDF) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDF
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFMetaData
|
|
|
|
Private preparationField As FCFCDFMetaDataPreparation
|
|
|
|
Private interchangeControlReferenceField As String
|
|
|
|
Private messageReferenceNumberField As String
|
|
|
|
Private messageIdentifierField As String
|
|
|
|
Private messageGroupField As FCFCDFMetaDataMessageGroup
|
|
|
|
Private testIndicatorField As FCFCDFMetaDataTestIndicator
|
|
|
|
Private testIndicatorFieldSpecified As Boolean
|
|
|
|
Private messageTypeField As FCFCDFMetaDataMessageType
|
|
|
|
Private interchangeSenderField As FCFCDFMetaDataInterchangeSender
|
|
|
|
Private interchangeRecipientField As FCFCDFMetaDataInterchangeRecipient
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.interchangeRecipientField = New FCFCDFMetaDataInterchangeRecipient()
|
|
Me.interchangeSenderField = New FCFCDFMetaDataInterchangeSender()
|
|
Me.preparationField = New FCFCDFMetaDataPreparation()
|
|
End Sub
|
|
|
|
Public Property Preparation() As FCFCDFMetaDataPreparation
|
|
Get
|
|
Return Me.preparationField
|
|
End Get
|
|
Set
|
|
Me.preparationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property InterchangeControlReference() As String
|
|
Get
|
|
Return Me.interchangeControlReferenceField
|
|
End Get
|
|
Set
|
|
Me.interchangeControlReferenceField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MessageReferenceNumber() As String
|
|
Get
|
|
Return Me.messageReferenceNumberField
|
|
End Get
|
|
Set
|
|
Me.messageReferenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MessageIdentifier() As String
|
|
Get
|
|
Return Me.messageIdentifierField
|
|
End Get
|
|
Set
|
|
Me.messageIdentifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MessageGroup() As FCFCDFMetaDataMessageGroup
|
|
Get
|
|
Return Me.messageGroupField
|
|
End Get
|
|
Set
|
|
Me.messageGroupField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TestIndicator() As FCFCDFMetaDataTestIndicator
|
|
Get
|
|
Return Me.testIndicatorField
|
|
End Get
|
|
Set
|
|
Me.testIndicatorField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property TestIndicatorSpecified() As Boolean
|
|
Get
|
|
Return Me.testIndicatorFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.testIndicatorFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MessageType() As FCFCDFMetaDataMessageType
|
|
Get
|
|
Return Me.messageTypeField
|
|
End Get
|
|
Set
|
|
Me.messageTypeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property InterchangeSender() As FCFCDFMetaDataInterchangeSender
|
|
Get
|
|
Return Me.interchangeSenderField
|
|
End Get
|
|
Set
|
|
Me.interchangeSenderField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property InterchangeRecipient() As FCFCDFMetaDataInterchangeRecipient
|
|
Get
|
|
Return Me.interchangeRecipientField
|
|
End Get
|
|
Set
|
|
Me.interchangeRecipientField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFMetaData))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaData object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFMetaData object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaData object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaData, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaData)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaData) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFMetaData
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFMetaData)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaData 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFMetaData object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaData object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaData, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaData)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaData) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFMetaData
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFMetaDataPreparation
|
|
|
|
Private dateField As Date
|
|
|
|
Private timeField As Date
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property [Date]() As Date
|
|
Get
|
|
Return Me.dateField
|
|
End Get
|
|
Set
|
|
Me.dateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Time() As Date
|
|
Get
|
|
Return Me.timeField
|
|
End Get
|
|
Set
|
|
Me.timeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFMetaDataPreparation))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataPreparation object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFMetaDataPreparation object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataPreparation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataPreparation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataPreparation)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataPreparation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFMetaDataPreparation
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFMetaDataPreparation)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataPreparation 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFMetaDataPreparation object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataPreparation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataPreparation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataPreparation)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataPreparation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFMetaDataPreparation
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFMetaDataMessageGroup
|
|
|
|
'''<remarks/>
|
|
ZBE
|
|
|
|
'''<remarks/>
|
|
ZBV
|
|
End Enum
|
|
|
|
Public Enum FCFCDFMetaDataTestIndicator
|
|
|
|
'''<remarks/>
|
|
<System.Xml.Serialization.XmlEnumAttribute("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
Public Enum FCFCDFMetaDataMessageType
|
|
|
|
'''<remarks/>
|
|
FCFCDF
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFMetaDataInterchangeSender
|
|
|
|
Private identificationField As FCFCDFMetaDataInterchangeSenderIdentification
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.identificationField = New FCFCDFMetaDataInterchangeSenderIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFMetaDataInterchangeSenderIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFMetaDataInterchangeSender))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeSender object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFMetaDataInterchangeSender object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeSender object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeSender)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeSender) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFMetaDataInterchangeSender
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFMetaDataInterchangeSender)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeSender 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFMetaDataInterchangeSender object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeSender object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeSender)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeSender) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFMetaDataInterchangeSender
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFMetaDataInterchangeSenderIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private subsidiaryNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me.subsidiaryNumberField
|
|
End Get
|
|
Set
|
|
Me.subsidiaryNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFMetaDataInterchangeSenderIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeSenderIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFMetaDataInterchangeSenderIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeSenderIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeSenderIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeSenderIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFMetaDataInterchangeSenderIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFMetaDataInterchangeSenderIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeSenderIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFMetaDataInterchangeSenderIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeSenderIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeSenderIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeSenderIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFMetaDataInterchangeSenderIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFMetaDataInterchangeRecipient
|
|
|
|
Private identificationField As FCFCDFMetaDataInterchangeRecipientIdentification
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.identificationField = New FCFCDFMetaDataInterchangeRecipientIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFMetaDataInterchangeRecipientIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFMetaDataInterchangeRecipient))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeRecipient object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFMetaDataInterchangeRecipient object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeRecipient object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipient)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeRecipient) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFMetaDataInterchangeRecipient
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFMetaDataInterchangeRecipient)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeRecipient 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFMetaDataInterchangeRecipient object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeRecipient object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipient)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeRecipient) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFMetaDataInterchangeRecipient
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFMetaDataInterchangeRecipientIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFMetaDataInterchangeRecipientIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeRecipientIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFMetaDataInterchangeRecipientIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeRecipientIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipientIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFMetaDataInterchangeRecipientIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFMetaDataInterchangeRecipientIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFMetaDataInterchangeRecipientIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFMetaDataInterchangeRecipientIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFMetaDataInterchangeRecipientIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFMetaDataInterchangeRecipientIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipientIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeRecipientIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFMetaDataInterchangeRecipientIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFHeader
|
|
|
|
Private messageVersionField As String
|
|
|
|
Private messageCreationDateField As Date
|
|
|
|
Private lRNField As String
|
|
|
|
Private declarationField As FCFCDFHeaderDeclaration
|
|
|
|
Private prematureInputFlagField As String
|
|
|
|
Private goodsItemQuantityField As String
|
|
|
|
Private customsGoodsStatusField As String
|
|
|
|
Private declarantIsConsigneeFlagField As String
|
|
|
|
Private customsAuthorisationField As FCFCDFHeaderCustomsAuthorisation
|
|
|
|
Private inputTaxDeductionFlagField As String
|
|
|
|
Private goodsLocationField As String
|
|
|
|
Private departureCountryField As String
|
|
|
|
Private paymentMethodField As FCFCDFHeaderPaymentMethod
|
|
|
|
Private currencyCodeField As FCFCDFHeaderCurrencyCode
|
|
|
|
Private additionalInformationField As String
|
|
|
|
Private taxOfficeField As String
|
|
|
|
Private representativeRelationshipFlagField As String
|
|
|
|
Private declarationPlaceField As String
|
|
|
|
Private authorisationNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.customsAuthorisationField = New FCFCDFHeaderCustomsAuthorisation()
|
|
Me.declarationField = New FCFCDFHeaderDeclaration()
|
|
End Sub
|
|
|
|
Public Property MessageVersion() As String
|
|
Get
|
|
Return Me.messageVersionField
|
|
End Get
|
|
Set
|
|
Me.messageVersionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MessageCreationDate() As Date
|
|
Get
|
|
Return Me.messageCreationDateField
|
|
End Get
|
|
Set
|
|
Me.messageCreationDateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LRN() As String
|
|
Get
|
|
Return Me.lRNField
|
|
End Get
|
|
Set
|
|
Me.lRNField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Declaration() As FCFCDFHeaderDeclaration
|
|
Get
|
|
Return Me.declarationField
|
|
End Get
|
|
Set
|
|
Me.declarationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PrematureInputFlag() As String
|
|
Get
|
|
Return Me.prematureInputFlagField
|
|
End Get
|
|
Set
|
|
Me.prematureInputFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsItemQuantity() As String
|
|
Get
|
|
Return Me.goodsItemQuantityField
|
|
End Get
|
|
Set
|
|
Me.goodsItemQuantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CustomsGoodsStatus() As String
|
|
Get
|
|
Return Me.customsGoodsStatusField
|
|
End Get
|
|
Set
|
|
Me.customsGoodsStatusField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DeclarantIsConsigneeFlag() As String
|
|
Get
|
|
Return Me.declarantIsConsigneeFlagField
|
|
End Get
|
|
Set
|
|
Me.declarantIsConsigneeFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CustomsAuthorisation() As FCFCDFHeaderCustomsAuthorisation
|
|
Get
|
|
Return Me.customsAuthorisationField
|
|
End Get
|
|
Set
|
|
Me.customsAuthorisationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property InputTaxDeductionFlag() As String
|
|
Get
|
|
Return Me.inputTaxDeductionFlagField
|
|
End Get
|
|
Set
|
|
Me.inputTaxDeductionFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsLocation() As String
|
|
Get
|
|
Return Me.goodsLocationField
|
|
End Get
|
|
Set
|
|
Me.goodsLocationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DepartureCountry() As String
|
|
Get
|
|
Return Me.departureCountryField
|
|
End Get
|
|
Set
|
|
Me.departureCountryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PaymentMethod() As FCFCDFHeaderPaymentMethod
|
|
Get
|
|
Return Me.paymentMethodField
|
|
End Get
|
|
Set
|
|
Me.paymentMethodField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyCode() As FCFCDFHeaderCurrencyCode
|
|
Get
|
|
Return Me.currencyCodeField
|
|
End Get
|
|
Set
|
|
Me.currencyCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AdditionalInformation() As String
|
|
Get
|
|
Return Me.additionalInformationField
|
|
End Get
|
|
Set
|
|
Me.additionalInformationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TaxOffice() As String
|
|
Get
|
|
Return Me.taxOfficeField
|
|
End Get
|
|
Set
|
|
Me.taxOfficeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property RepresentativeRelationshipFlag() As String
|
|
Get
|
|
Return Me.representativeRelationshipFlagField
|
|
End Get
|
|
Set
|
|
Me.representativeRelationshipFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DeclarationPlace() As String
|
|
Get
|
|
Return Me.declarationPlaceField
|
|
End Get
|
|
Set
|
|
Me.declarationPlaceField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AuthorisationNumber() As String
|
|
Get
|
|
Return Me.authorisationNumberField
|
|
End Get
|
|
Set
|
|
Me.authorisationNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFHeader))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFHeader object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFHeader object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFHeader object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFHeader, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFHeader)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFHeader) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFHeader
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFHeader)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFHeader 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFHeader object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFHeader object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeader, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFHeader)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeader) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFHeader
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFHeaderDeclaration
|
|
|
|
Private kindField As FCFCDFHeaderDeclarationKind
|
|
|
|
Private typeField As FCFCDFHeaderDeclarationType
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Kind() As FCFCDFHeaderDeclarationKind
|
|
Get
|
|
Return Me.kindField
|
|
End Get
|
|
Set
|
|
Me.kindField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Type() As FCFCDFHeaderDeclarationType
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFHeaderDeclaration))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFHeaderDeclaration object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFHeaderDeclaration object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFHeaderDeclaration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFHeaderDeclaration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFHeaderDeclaration)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFHeaderDeclaration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFHeaderDeclaration
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFHeaderDeclaration)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFHeaderDeclaration 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFHeaderDeclaration object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFHeaderDeclaration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeaderDeclaration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFHeaderDeclaration)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeaderDeclaration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFHeaderDeclaration
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFHeaderDeclarationKind
|
|
|
|
'''<remarks/>
|
|
A
|
|
|
|
'''<remarks/>
|
|
B
|
|
|
|
'''<remarks/>
|
|
D
|
|
|
|
'''<remarks/>
|
|
E
|
|
End Enum
|
|
|
|
Public Enum FCFCDFHeaderDeclarationType
|
|
|
|
'''<remarks/>
|
|
EZA
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFHeaderCustomsAuthorisation
|
|
|
|
Private endUseField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property EndUse() As String
|
|
Get
|
|
Return Me.endUseField
|
|
End Get
|
|
Set
|
|
Me.endUseField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFHeaderCustomsAuthorisation))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFHeaderCustomsAuthorisation object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFHeaderCustomsAuthorisation object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFHeaderCustomsAuthorisation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFHeaderCustomsAuthorisation)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFHeaderCustomsAuthorisation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFHeaderCustomsAuthorisation
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFHeaderCustomsAuthorisation)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFHeaderCustomsAuthorisation 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFHeaderCustomsAuthorisation object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFHeaderCustomsAuthorisation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFHeaderCustomsAuthorisation)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeaderCustomsAuthorisation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFHeaderCustomsAuthorisation
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFHeaderPaymentMethod
|
|
|
|
'''<remarks/>
|
|
A
|
|
|
|
'''<remarks/>
|
|
C
|
|
|
|
'''<remarks/>
|
|
D
|
|
|
|
'''<remarks/>
|
|
E
|
|
|
|
'''<remarks/>
|
|
F
|
|
|
|
'''<remarks/>
|
|
G
|
|
End Enum
|
|
|
|
Public Enum FCFCDFHeaderCurrencyCode
|
|
|
|
'''<remarks/>
|
|
EUR
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFDeclarant
|
|
|
|
Private identificationField As FCFCDFDeclarantIdentification
|
|
|
|
Private nameField As String
|
|
|
|
Private addressField As FCFCDFDeclarantAddress
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.addressField = New FCFCDFDeclarantAddress()
|
|
Me.identificationField = New FCFCDFDeclarantIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFDeclarantIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Address() As FCFCDFDeclarantAddress
|
|
Get
|
|
Return Me.addressField
|
|
End Get
|
|
Set
|
|
Me.addressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFDeclarant))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDeclarant object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFDeclarant object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDeclarant object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDeclarant, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDeclarant)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDeclarant) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFDeclarant
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFDeclarant)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDeclarant 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFDeclarant object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDeclarant object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarant, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDeclarant)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarant) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFDeclarant
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFDeclarantIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private subsidiaryNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me.subsidiaryNumberField
|
|
End Get
|
|
Set
|
|
Me.subsidiaryNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFDeclarantIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDeclarantIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFDeclarantIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDeclarantIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDeclarantIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDeclarantIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDeclarantIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFDeclarantIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFDeclarantIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDeclarantIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFDeclarantIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDeclarantIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarantIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDeclarantIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarantIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFDeclarantIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFDeclarantAddress
|
|
|
|
Private lineField As String
|
|
|
|
Private countryField As String
|
|
|
|
Private postcodeField As String
|
|
|
|
Private cityField As String
|
|
|
|
Private districtField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Line() As String
|
|
Get
|
|
Return Me.lineField
|
|
End Get
|
|
Set
|
|
Me.lineField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me.countryField
|
|
End Get
|
|
Set
|
|
Me.countryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me.postcodeField
|
|
End Get
|
|
Set
|
|
Me.postcodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property City() As String
|
|
Get
|
|
Return Me.cityField
|
|
End Get
|
|
Set
|
|
Me.cityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property District() As String
|
|
Get
|
|
Return Me.districtField
|
|
End Get
|
|
Set
|
|
Me.districtField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFDeclarantAddress))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDeclarantAddress object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFDeclarantAddress object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDeclarantAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDeclarantAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDeclarantAddress)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDeclarantAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFDeclarantAddress
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFDeclarantAddress)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDeclarantAddress 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFDeclarantAddress object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDeclarantAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarantAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDeclarantAddress)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarantAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFDeclarantAddress
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFRepresentative
|
|
|
|
Private identificationField As FCFCDFRepresentativeIdentification
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.identificationField = New FCFCDFRepresentativeIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFRepresentativeIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFRepresentative))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFRepresentative object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFRepresentative object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFRepresentative object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFRepresentative, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFRepresentative)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFRepresentative) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFRepresentative
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFRepresentative)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFRepresentative 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFRepresentative object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFRepresentative object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFRepresentative, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFRepresentative)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFRepresentative) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFRepresentative
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFRepresentativeIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private subsidiaryNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me.subsidiaryNumberField
|
|
End Get
|
|
Set
|
|
Me.subsidiaryNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFRepresentativeIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFRepresentativeIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFRepresentativeIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFRepresentativeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFRepresentativeIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFRepresentativeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFRepresentativeIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFRepresentativeIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFRepresentativeIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFRepresentativeIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFRepresentativeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFRepresentativeIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFRepresentativeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFRepresentativeIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFPrincipal
|
|
|
|
Private identificationField As FCFCDFPrincipalIdentification
|
|
|
|
Private nameField As String
|
|
|
|
Private addressField As FCFCDFPrincipalAddress
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.addressField = New FCFCDFPrincipalAddress()
|
|
Me.identificationField = New FCFCDFPrincipalIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFPrincipalIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Address() As FCFCDFPrincipalAddress
|
|
Get
|
|
Return Me.addressField
|
|
End Get
|
|
Set
|
|
Me.addressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFPrincipal))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPrincipal object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFPrincipal object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPrincipal object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPrincipal, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPrincipal)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPrincipal) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFPrincipal
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFPrincipal)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPrincipal 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFPrincipal object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPrincipal object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipal, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPrincipal)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipal) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFPrincipal
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFPrincipalIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private subsidiaryNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me.subsidiaryNumberField
|
|
End Get
|
|
Set
|
|
Me.subsidiaryNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFPrincipalIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPrincipalIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFPrincipalIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPrincipalIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPrincipalIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPrincipalIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPrincipalIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFPrincipalIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFPrincipalIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPrincipalIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFPrincipalIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPrincipalIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipalIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPrincipalIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipalIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFPrincipalIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFPrincipalAddress
|
|
|
|
Private lineField As String
|
|
|
|
Private countryField As String
|
|
|
|
Private postcodeField As String
|
|
|
|
Private cityField As String
|
|
|
|
Private districtField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Line() As String
|
|
Get
|
|
Return Me.lineField
|
|
End Get
|
|
Set
|
|
Me.lineField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me.countryField
|
|
End Get
|
|
Set
|
|
Me.countryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me.postcodeField
|
|
End Get
|
|
Set
|
|
Me.postcodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property City() As String
|
|
Get
|
|
Return Me.cityField
|
|
End Get
|
|
Set
|
|
Me.cityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property District() As String
|
|
Get
|
|
Return Me.districtField
|
|
End Get
|
|
Set
|
|
Me.districtField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFPrincipalAddress))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPrincipalAddress object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFPrincipalAddress object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPrincipalAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPrincipalAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPrincipalAddress)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPrincipalAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFPrincipalAddress
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFPrincipalAddress)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPrincipalAddress 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFPrincipalAddress object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPrincipalAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipalAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPrincipalAddress)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipalAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFPrincipalAddress
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFContactPerson
|
|
|
|
Private nameField As String
|
|
|
|
Private positionField As String
|
|
|
|
Private phoneNumberField As String
|
|
|
|
Private mailAddressField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Position() As String
|
|
Get
|
|
Return Me.positionField
|
|
End Get
|
|
Set
|
|
Me.positionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PhoneNumber() As String
|
|
Get
|
|
Return Me.phoneNumberField
|
|
End Get
|
|
Set
|
|
Me.phoneNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MailAddress() As String
|
|
Get
|
|
Return Me.mailAddressField
|
|
End Get
|
|
Set
|
|
Me.mailAddressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFContactPerson))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFContactPerson object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFContactPerson object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFContactPerson object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFContactPerson, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFContactPerson)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFContactPerson) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFContactPerson
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFContactPerson)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFContactPerson 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFContactPerson object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFContactPerson object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFContactPerson, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFContactPerson)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFContactPerson) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFContactPerson
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFDutyDefermentApproval
|
|
|
|
Private typeField As String
|
|
|
|
Private applicationTypeField As String
|
|
|
|
Private accountPrefixField As String
|
|
|
|
Private accountNumberField As String
|
|
|
|
Private authorisationNumberField As String
|
|
|
|
Private dutyDefermentApplicantField As FCFCDFDutyDefermentApprovalDutyDefermentApplicant
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.dutyDefermentApplicantField = New FCFCDFDutyDefermentApprovalDutyDefermentApplicant()
|
|
End Sub
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ApplicationType() As String
|
|
Get
|
|
Return Me.applicationTypeField
|
|
End Get
|
|
Set
|
|
Me.applicationTypeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AccountPrefix() As String
|
|
Get
|
|
Return Me.accountPrefixField
|
|
End Get
|
|
Set
|
|
Me.accountPrefixField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AccountNumber() As String
|
|
Get
|
|
Return Me.accountNumberField
|
|
End Get
|
|
Set
|
|
Me.accountNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AuthorisationNumber() As String
|
|
Get
|
|
Return Me.authorisationNumberField
|
|
End Get
|
|
Set
|
|
Me.authorisationNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DutyDefermentApplicant() As FCFCDFDutyDefermentApprovalDutyDefermentApplicant
|
|
Get
|
|
Return Me.dutyDefermentApplicantField
|
|
End Get
|
|
Set
|
|
Me.dutyDefermentApplicantField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFDutyDefermentApproval))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDutyDefermentApproval object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFDutyDefermentApproval object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDutyDefermentApproval object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDutyDefermentApproval)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDutyDefermentApproval) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFDutyDefermentApproval
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFDutyDefermentApproval)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDutyDefermentApproval 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFDutyDefermentApproval object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDutyDefermentApproval object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDutyDefermentApproval)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApproval) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFDutyDefermentApproval
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFDutyDefermentApprovalDutyDefermentApplicant
|
|
|
|
Private identificationField As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.identificationField = New FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFDutyDefermentApprovalDutyDefermentApplicant))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDutyDefermentApprovalDutyDefermentApplicant object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFDutyDefermentApprovalDutyDefermentApplicant object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicant object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicant)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicant) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFDutyDefermentApprovalDutyDefermentApplicant
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFDutyDefermentApprovalDutyDefermentApplicant)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDutyDefermentApprovalDutyDefermentApplicant 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicant object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicant)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicant) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFDutyDefermentApprovalDutyDefermentApplicant
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBorderTransportMeans
|
|
|
|
Private modeField As String
|
|
|
|
Private typeField As String
|
|
|
|
Private informationField As String
|
|
|
|
Private nationalityField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Mode() As String
|
|
Get
|
|
Return Me.modeField
|
|
End Get
|
|
Set
|
|
Me.modeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Information() As String
|
|
Get
|
|
Return Me.informationField
|
|
End Get
|
|
Set
|
|
Me.informationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Nationality() As String
|
|
Get
|
|
Return Me.nationalityField
|
|
End Get
|
|
Set
|
|
Me.nationalityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBorderTransportMeans))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBorderTransportMeans object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBorderTransportMeans object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBorderTransportMeans object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBorderTransportMeans, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBorderTransportMeans)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBorderTransportMeans) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBorderTransportMeans
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBorderTransportMeans)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBorderTransportMeans 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBorderTransportMeans object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBorderTransportMeans object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBorderTransportMeans, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBorderTransportMeans)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBorderTransportMeans) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBorderTransportMeans
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFArrivalTransportMeans
|
|
|
|
Private identityField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Identity() As String
|
|
Get
|
|
Return Me.identityField
|
|
End Get
|
|
Set
|
|
Me.identityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFArrivalTransportMeans))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFArrivalTransportMeans object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFArrivalTransportMeans object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFArrivalTransportMeans object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFArrivalTransportMeans)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFArrivalTransportMeans) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFArrivalTransportMeans
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFArrivalTransportMeans)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFArrivalTransportMeans 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFArrivalTransportMeans object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFArrivalTransportMeans object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFArrivalTransportMeans)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFArrivalTransportMeans) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFArrivalTransportMeans
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFPreviousAdministrativeReferences
|
|
|
|
Private typeField As String
|
|
|
|
Private previousAdministrativeReferenceField As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.previousAdministrativeReferenceField = New FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference()
|
|
End Sub
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PreviousAdministrativeReference() As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
|
|
Get
|
|
Return Me.previousAdministrativeReferenceField
|
|
End Get
|
|
Set
|
|
Me.previousAdministrativeReferenceField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFPreviousAdministrativeReferences))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPreviousAdministrativeReferences object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFPreviousAdministrativeReferences object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPreviousAdministrativeReferences object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPreviousAdministrativeReferences)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPreviousAdministrativeReferences) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFPreviousAdministrativeReferences
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFPreviousAdministrativeReferences)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPreviousAdministrativeReferences 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFPreviousAdministrativeReferences object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPreviousAdministrativeReferences object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPreviousAdministrativeReferences)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPreviousAdministrativeReferences) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFPreviousAdministrativeReferences
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFSummaryDeclaration
|
|
|
|
Private identificationIndicatorField As FCFCDFSummaryDeclarationIdentificationIndicator
|
|
|
|
Private goodsItemField As List(Of FCFCDFSummaryDeclarationGoodsItem)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.goodsItemField = New List(Of FCFCDFSummaryDeclarationGoodsItem)()
|
|
End Sub
|
|
|
|
Public Property IdentificationIndicator() As FCFCDFSummaryDeclarationIdentificationIndicator
|
|
Get
|
|
Return Me.identificationIndicatorField
|
|
End Get
|
|
Set
|
|
Me.identificationIndicatorField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsItem() As List(Of FCFCDFSummaryDeclarationGoodsItem)
|
|
Get
|
|
Return Me.goodsItemField
|
|
End Get
|
|
Set
|
|
Me.goodsItemField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFSummaryDeclaration))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclaration object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFSummaryDeclaration object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclaration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclaration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclaration)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclaration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFSummaryDeclaration
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFSummaryDeclaration)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclaration 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFSummaryDeclaration object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclaration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclaration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclaration)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclaration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFSummaryDeclaration
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFSummaryDeclarationIdentificationIndicator
|
|
|
|
'''<remarks/>
|
|
AWB
|
|
|
|
'''<remarks/>
|
|
REG
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFSummaryDeclarationGoodsItem
|
|
|
|
Private quantityField As String
|
|
|
|
Private identificationByKeyField As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
|
|
|
|
Private identificationByRegistrationField As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.identificationByRegistrationField = New FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration()
|
|
Me.identificationByKeyField = New FCFCDFSummaryDeclarationGoodsItemIdentificationByKey()
|
|
End Sub
|
|
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property IdentificationByKey() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
|
|
Get
|
|
Return Me.identificationByKeyField
|
|
End Get
|
|
Set
|
|
Me.identificationByKeyField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property IdentificationByRegistration() As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
|
|
Get
|
|
Return Me.identificationByRegistrationField
|
|
End Get
|
|
Set
|
|
Me.identificationByRegistrationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFSummaryDeclarationGoodsItem))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItem object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFSummaryDeclarationGoodsItem object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItem)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFSummaryDeclarationGoodsItem
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFSummaryDeclarationGoodsItem)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItem 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFSummaryDeclarationGoodsItem object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItem)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFSummaryDeclarationGoodsItem
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
|
|
|
|
Private kindField As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyKind
|
|
|
|
Private numberField As String
|
|
|
|
Private custodianField As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.custodianField = New FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian()
|
|
End Sub
|
|
|
|
Public Property Kind() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyKind
|
|
Get
|
|
Return Me.kindField
|
|
End Get
|
|
Set
|
|
Me.kindField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Number() As String
|
|
Get
|
|
Return Me.numberField
|
|
End Get
|
|
Set
|
|
Me.numberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Custodian() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
|
|
Get
|
|
Return Me.custodianField
|
|
End Get
|
|
Set
|
|
Me.custodianField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByKey))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKey)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFSummaryDeclarationGoodsItemIdentificationByKey)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKey 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKey)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyKind
|
|
|
|
'''<remarks/>
|
|
AWB
|
|
|
|
'''<remarks/>
|
|
ULD
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
|
|
|
|
Private identificationField As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.identificationField = New FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
|
|
|
|
Private mRNField As String
|
|
|
|
Private referencedRegistrationNumberField As String
|
|
|
|
Private referencedSequenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property MRN() As String
|
|
Get
|
|
Return Me.mRNField
|
|
End Get
|
|
Set
|
|
Me.mRNField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferencedRegistrationNumber() As String
|
|
Get
|
|
Return Me.referencedRegistrationNumberField
|
|
End Get
|
|
Set
|
|
Me.referencedRegistrationNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferencedSequenceNumber() As String
|
|
Get
|
|
Return Me.referencedSequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referencedSequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFCustomsWarehouse
|
|
|
|
Private lRNField As String
|
|
|
|
Private sequenceNumberField As FCFCDFCustomsWarehouseSequenceNumber
|
|
|
|
Private goodsItemQuantityField As String
|
|
|
|
Private customsAuthorisationField As FCFCDFCustomsWarehouseCustomsAuthorisation
|
|
|
|
Private goodsItemField As List(Of FCFCDFCustomsWarehouseGoodsItem)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.goodsItemField = New List(Of FCFCDFCustomsWarehouseGoodsItem)()
|
|
Me.customsAuthorisationField = New FCFCDFCustomsWarehouseCustomsAuthorisation()
|
|
End Sub
|
|
|
|
Public Property LRN() As String
|
|
Get
|
|
Return Me.lRNField
|
|
End Get
|
|
Set
|
|
Me.lRNField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SequenceNumber() As FCFCDFCustomsWarehouseSequenceNumber
|
|
Get
|
|
Return Me.sequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.sequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsItemQuantity() As String
|
|
Get
|
|
Return Me.goodsItemQuantityField
|
|
End Get
|
|
Set
|
|
Me.goodsItemQuantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CustomsAuthorisation() As FCFCDFCustomsWarehouseCustomsAuthorisation
|
|
Get
|
|
Return Me.customsAuthorisationField
|
|
End Get
|
|
Set
|
|
Me.customsAuthorisationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsItem() As List(Of FCFCDFCustomsWarehouseGoodsItem)
|
|
Get
|
|
Return Me.goodsItemField
|
|
End Get
|
|
Set
|
|
Me.goodsItemField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFCustomsWarehouse))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouse object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFCustomsWarehouse object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouse object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouse, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouse)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouse) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFCustomsWarehouse
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFCustomsWarehouse)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouse 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFCustomsWarehouse object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouse object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouse, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouse)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouse) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFCustomsWarehouse
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFCustomsWarehouseSequenceNumber
|
|
|
|
'''<remarks/>
|
|
<System.Xml.Serialization.XmlEnumAttribute("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFCustomsWarehouseCustomsAuthorisation
|
|
|
|
Private warehouseOwnerField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property WarehouseOwner() As String
|
|
Get
|
|
Return Me.warehouseOwnerField
|
|
End Get
|
|
Set
|
|
Me.warehouseOwnerField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFCustomsWarehouseCustomsAuthorisation))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseCustomsAuthorisation object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFCustomsWarehouseCustomsAuthorisation object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseCustomsAuthorisation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseCustomsAuthorisation)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseCustomsAuthorisation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFCustomsWarehouseCustomsAuthorisation
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFCustomsWarehouseCustomsAuthorisation)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseCustomsAuthorisation 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFCustomsWarehouseCustomsAuthorisation object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseCustomsAuthorisation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseCustomsAuthorisation)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseCustomsAuthorisation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFCustomsWarehouseCustomsAuthorisation
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFCustomsWarehouseGoodsItem
|
|
|
|
Private sequenceNumberField As String
|
|
|
|
Private mRNField As String
|
|
|
|
Private referencedRegistrationNumberField As String
|
|
|
|
Private referencedSequenceNumberField As String
|
|
|
|
Private accessViaAtlasFlagField As String
|
|
|
|
Private commodityCodeField As String
|
|
|
|
Private usualProcessingFlagField As String
|
|
|
|
Private complementField As String
|
|
|
|
Private commercialAmountField As FCFCDFCustomsWarehouseGoodsItemCommercialAmount
|
|
|
|
Private debitAmountField As FCFCDFCustomsWarehouseGoodsItemDebitAmount
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.debitAmountField = New FCFCDFCustomsWarehouseGoodsItemDebitAmount()
|
|
Me.commercialAmountField = New FCFCDFCustomsWarehouseGoodsItemCommercialAmount()
|
|
End Sub
|
|
|
|
Public Property SequenceNumber() As String
|
|
Get
|
|
Return Me.sequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.sequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MRN() As String
|
|
Get
|
|
Return Me.mRNField
|
|
End Get
|
|
Set
|
|
Me.mRNField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferencedRegistrationNumber() As String
|
|
Get
|
|
Return Me.referencedRegistrationNumberField
|
|
End Get
|
|
Set
|
|
Me.referencedRegistrationNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferencedSequenceNumber() As String
|
|
Get
|
|
Return Me.referencedSequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referencedSequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AccessViaAtlasFlag() As String
|
|
Get
|
|
Return Me.accessViaAtlasFlagField
|
|
End Get
|
|
Set
|
|
Me.accessViaAtlasFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CommodityCode() As String
|
|
Get
|
|
Return Me.commodityCodeField
|
|
End Get
|
|
Set
|
|
Me.commodityCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property UsualProcessingFlag() As String
|
|
Get
|
|
Return Me.usualProcessingFlagField
|
|
End Get
|
|
Set
|
|
Me.usualProcessingFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Complement() As String
|
|
Get
|
|
Return Me.complementField
|
|
End Get
|
|
Set
|
|
Me.complementField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CommercialAmount() As FCFCDFCustomsWarehouseGoodsItemCommercialAmount
|
|
Get
|
|
Return Me.commercialAmountField
|
|
End Get
|
|
Set
|
|
Me.commercialAmountField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DebitAmount() As FCFCDFCustomsWarehouseGoodsItemDebitAmount
|
|
Get
|
|
Return Me.debitAmountField
|
|
End Get
|
|
Set
|
|
Me.debitAmountField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFCustomsWarehouseGoodsItem))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseGoodsItem object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFCustomsWarehouseGoodsItem object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItem)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFCustomsWarehouseGoodsItem
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFCustomsWarehouseGoodsItem)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseGoodsItem 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFCustomsWarehouseGoodsItem object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItem)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFCustomsWarehouseGoodsItem
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFCustomsWarehouseGoodsItemCommercialAmount
|
|
|
|
Private quantityField As Decimal
|
|
|
|
Private measurementUnitField As String
|
|
|
|
Private qualifierField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Quantity() As Decimal
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me.measurementUnitField
|
|
End Get
|
|
Set
|
|
Me.measurementUnitField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me.qualifierField
|
|
End Get
|
|
Set
|
|
Me.qualifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFCustomsWarehouseGoodsItemCommercialAmount))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseGoodsItemCommercialAmount object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFCustomsWarehouseGoodsItemCommercialAmount object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseGoodsItemCommercialAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemCommercialAmount)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemCommercialAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFCustomsWarehouseGoodsItemCommercialAmount
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFCustomsWarehouseGoodsItemCommercialAmount)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseGoodsItemCommercialAmount 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseGoodsItemCommercialAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemCommercialAmount)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemCommercialAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFCustomsWarehouseGoodsItemCommercialAmount
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFCustomsWarehouseGoodsItemDebitAmount
|
|
|
|
Private quantityField As Decimal
|
|
|
|
Private measurementUnitField As String
|
|
|
|
Private qualifierField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Quantity() As Decimal
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me.measurementUnitField
|
|
End Get
|
|
Set
|
|
Me.measurementUnitField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me.qualifierField
|
|
End Get
|
|
Set
|
|
Me.qualifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFCustomsWarehouseGoodsItemDebitAmount))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseGoodsItemDebitAmount object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFCustomsWarehouseGoodsItemDebitAmount object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseGoodsItemDebitAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemDebitAmount)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemDebitAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFCustomsWarehouseGoodsItemDebitAmount
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFCustomsWarehouseGoodsItemDebitAmount)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFCustomsWarehouseGoodsItemDebitAmount 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFCustomsWarehouseGoodsItemDebitAmount object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFCustomsWarehouseGoodsItemDebitAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemDebitAmount)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemDebitAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFCustomsWarehouseGoodsItemDebitAmount
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFInwardProcessing
|
|
|
|
Private sequenceNumberField As FCFCDFInwardProcessingSequenceNumber
|
|
|
|
Private goodsItemQuantityField As String
|
|
|
|
Private customsAuthorisationField As FCFCDFInwardProcessingCustomsAuthorisation
|
|
|
|
Private simplifiedGrantAuthorisationFlagField As String
|
|
|
|
Private monitoringCustomsOfficeField As FCFCDFInwardProcessingMonitoringCustomsOffice
|
|
|
|
Private goodsItemField As List(Of FCFCDFInwardProcessingGoodsItem)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.goodsItemField = New List(Of FCFCDFInwardProcessingGoodsItem)()
|
|
Me.monitoringCustomsOfficeField = New FCFCDFInwardProcessingMonitoringCustomsOffice()
|
|
Me.customsAuthorisationField = New FCFCDFInwardProcessingCustomsAuthorisation()
|
|
End Sub
|
|
|
|
Public Property SequenceNumber() As FCFCDFInwardProcessingSequenceNumber
|
|
Get
|
|
Return Me.sequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.sequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsItemQuantity() As String
|
|
Get
|
|
Return Me.goodsItemQuantityField
|
|
End Get
|
|
Set
|
|
Me.goodsItemQuantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CustomsAuthorisation() As FCFCDFInwardProcessingCustomsAuthorisation
|
|
Get
|
|
Return Me.customsAuthorisationField
|
|
End Get
|
|
Set
|
|
Me.customsAuthorisationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SimplifiedGrantAuthorisationFlag() As String
|
|
Get
|
|
Return Me.simplifiedGrantAuthorisationFlagField
|
|
End Get
|
|
Set
|
|
Me.simplifiedGrantAuthorisationFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MonitoringCustomsOffice() As FCFCDFInwardProcessingMonitoringCustomsOffice
|
|
Get
|
|
Return Me.monitoringCustomsOfficeField
|
|
End Get
|
|
Set
|
|
Me.monitoringCustomsOfficeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsItem() As List(Of FCFCDFInwardProcessingGoodsItem)
|
|
Get
|
|
Return Me.goodsItemField
|
|
End Get
|
|
Set
|
|
Me.goodsItemField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFInwardProcessing))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessing object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFInwardProcessing object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessing object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessing, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessing)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessing) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFInwardProcessing
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFInwardProcessing)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessing 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFInwardProcessing object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessing object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessing, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessing)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessing) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFInwardProcessing
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFInwardProcessingSequenceNumber
|
|
|
|
'''<remarks/>
|
|
<System.Xml.Serialization.XmlEnumAttribute("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFInwardProcessingCustomsAuthorisation
|
|
|
|
Private processingOwnerField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ProcessingOwner() As String
|
|
Get
|
|
Return Me.processingOwnerField
|
|
End Get
|
|
Set
|
|
Me.processingOwnerField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFInwardProcessingCustomsAuthorisation))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingCustomsAuthorisation object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFInwardProcessingCustomsAuthorisation object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingCustomsAuthorisation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingCustomsAuthorisation)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingCustomsAuthorisation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFInwardProcessingCustomsAuthorisation
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFInwardProcessingCustomsAuthorisation)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingCustomsAuthorisation 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFInwardProcessingCustomsAuthorisation object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingCustomsAuthorisation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingCustomsAuthorisation)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingCustomsAuthorisation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFInwardProcessingCustomsAuthorisation
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFInwardProcessingMonitoringCustomsOffice
|
|
|
|
Private identificationField As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.identificationField = New FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFInwardProcessingMonitoringCustomsOffice))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingMonitoringCustomsOffice object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFInwardProcessingMonitoringCustomsOffice object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOffice object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOffice)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOffice) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFInwardProcessingMonitoringCustomsOffice
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFInwardProcessingMonitoringCustomsOffice)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingMonitoringCustomsOffice 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFInwardProcessingMonitoringCustomsOffice object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOffice object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOffice)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOffice) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFInwardProcessingMonitoringCustomsOffice
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFInwardProcessingGoodsItem
|
|
|
|
Private sequenceNumberField As String
|
|
|
|
Private mRNField As String
|
|
|
|
Private referencedRegistrationNumberField As String
|
|
|
|
Private referencedSequenceNumberField As String
|
|
|
|
Private accessViaAtlasFlagField As String
|
|
|
|
Private goodsRelatedInformationField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property SequenceNumber() As String
|
|
Get
|
|
Return Me.sequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.sequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MRN() As String
|
|
Get
|
|
Return Me.mRNField
|
|
End Get
|
|
Set
|
|
Me.mRNField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferencedRegistrationNumber() As String
|
|
Get
|
|
Return Me.referencedRegistrationNumberField
|
|
End Get
|
|
Set
|
|
Me.referencedRegistrationNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferencedSequenceNumber() As String
|
|
Get
|
|
Return Me.referencedSequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referencedSequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AccessViaAtlasFlag() As String
|
|
Get
|
|
Return Me.accessViaAtlasFlagField
|
|
End Get
|
|
Set
|
|
Me.accessViaAtlasFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsRelatedInformation() As String
|
|
Get
|
|
Return Me.goodsRelatedInformationField
|
|
End Get
|
|
Set
|
|
Me.goodsRelatedInformationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFInwardProcessingGoodsItem))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingGoodsItem object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFInwardProcessingGoodsItem object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingGoodsItem)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFInwardProcessingGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFInwardProcessingGoodsItem
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFInwardProcessingGoodsItem)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFInwardProcessingGoodsItem 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFInwardProcessingGoodsItem object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFInwardProcessingGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFInwardProcessingGoodsItem)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFInwardProcessingGoodsItem
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBody
|
|
|
|
Private customsValueFlagField As String
|
|
|
|
Private consignorField As FCFCDFBodyConsignor
|
|
|
|
Private consigneeField As FCFCDFBodyConsignee
|
|
|
|
Private additionalDutyReferencesField As List(Of FCFCDFBodyAdditionalDutyReferences)
|
|
|
|
Private containersField As FCFCDFBodyContainers
|
|
|
|
Private deliveryTermsField As FCFCDFBodyDeliveryTerms
|
|
|
|
Private paymentTransactionField As FCFCDFBodyPaymentTransaction
|
|
|
|
Private foreignTradeStatisticsField As FCFCDFBodyForeignTradeStatistics
|
|
|
|
Private customsValueField As FCFCDFBodyCustomsValue
|
|
|
|
Private documentField As List(Of FCFCDFBodyDocument)
|
|
|
|
Private goodsItemField As List(Of FCFCDFBodyGoodsItem)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.goodsItemField = New List(Of FCFCDFBodyGoodsItem)()
|
|
Me.documentField = New List(Of FCFCDFBodyDocument)()
|
|
Me.customsValueField = New FCFCDFBodyCustomsValue()
|
|
Me.foreignTradeStatisticsField = New FCFCDFBodyForeignTradeStatistics()
|
|
Me.paymentTransactionField = New FCFCDFBodyPaymentTransaction()
|
|
Me.deliveryTermsField = New FCFCDFBodyDeliveryTerms()
|
|
Me.containersField = New FCFCDFBodyContainers()
|
|
Me.additionalDutyReferencesField = New List(Of FCFCDFBodyAdditionalDutyReferences)()
|
|
Me.consigneeField = New FCFCDFBodyConsignee()
|
|
Me.consignorField = New FCFCDFBodyConsignor()
|
|
End Sub
|
|
|
|
Public Property CustomsValueFlag() As String
|
|
Get
|
|
Return Me.customsValueFlagField
|
|
End Get
|
|
Set
|
|
Me.customsValueFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Consignor() As FCFCDFBodyConsignor
|
|
Get
|
|
Return Me.consignorField
|
|
End Get
|
|
Set
|
|
Me.consignorField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Consignee() As FCFCDFBodyConsignee
|
|
Get
|
|
Return Me.consigneeField
|
|
End Get
|
|
Set
|
|
Me.consigneeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AdditionalDutyReferences() As List(Of FCFCDFBodyAdditionalDutyReferences)
|
|
Get
|
|
Return Me.additionalDutyReferencesField
|
|
End Get
|
|
Set
|
|
Me.additionalDutyReferencesField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Containers() As FCFCDFBodyContainers
|
|
Get
|
|
Return Me.containersField
|
|
End Get
|
|
Set
|
|
Me.containersField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DeliveryTerms() As FCFCDFBodyDeliveryTerms
|
|
Get
|
|
Return Me.deliveryTermsField
|
|
End Get
|
|
Set
|
|
Me.deliveryTermsField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PaymentTransaction() As FCFCDFBodyPaymentTransaction
|
|
Get
|
|
Return Me.paymentTransactionField
|
|
End Get
|
|
Set
|
|
Me.paymentTransactionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ForeignTradeStatistics() As FCFCDFBodyForeignTradeStatistics
|
|
Get
|
|
Return Me.foreignTradeStatisticsField
|
|
End Get
|
|
Set
|
|
Me.foreignTradeStatisticsField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CustomsValue() As FCFCDFBodyCustomsValue
|
|
Get
|
|
Return Me.customsValueField
|
|
End Get
|
|
Set
|
|
Me.customsValueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Document() As List(Of FCFCDFBodyDocument)
|
|
Get
|
|
Return Me.documentField
|
|
End Get
|
|
Set
|
|
Me.documentField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsItem() As List(Of FCFCDFBodyGoodsItem)
|
|
Get
|
|
Return Me.goodsItemField
|
|
End Get
|
|
Set
|
|
Me.goodsItemField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBody))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBody object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBody object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBody object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBody, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBody)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBody) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBody
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBody)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBody 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBody object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBody object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBody, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBody)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBody) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBody
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyConsignor
|
|
|
|
Private identificationField As FCFCDFBodyConsignorIdentification
|
|
|
|
Private nameField As String
|
|
|
|
Private addressField As FCFCDFBodyConsignorAddress
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.addressField = New FCFCDFBodyConsignorAddress()
|
|
Me.identificationField = New FCFCDFBodyConsignorIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFBodyConsignorIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Address() As FCFCDFBodyConsignorAddress
|
|
Get
|
|
Return Me.addressField
|
|
End Get
|
|
Set
|
|
Me.addressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyConsignor))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignor object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyConsignor object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignor object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignor, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignor)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignor) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyConsignor
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyConsignor)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignor 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyConsignor object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignor object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignor, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignor)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignor) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyConsignor
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyConsignorIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyConsignorIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignorIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyConsignorIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignorIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignorIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignorIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyConsignorIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyConsignorIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignorIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyConsignorIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignorIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignorIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignorIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyConsignorIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyConsignorAddress
|
|
|
|
Private lineField As String
|
|
|
|
Private countryField As String
|
|
|
|
Private postcodeField As String
|
|
|
|
Private cityField As String
|
|
|
|
Private districtField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Line() As String
|
|
Get
|
|
Return Me.lineField
|
|
End Get
|
|
Set
|
|
Me.lineField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me.countryField
|
|
End Get
|
|
Set
|
|
Me.countryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me.postcodeField
|
|
End Get
|
|
Set
|
|
Me.postcodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property City() As String
|
|
Get
|
|
Return Me.cityField
|
|
End Get
|
|
Set
|
|
Me.cityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property District() As String
|
|
Get
|
|
Return Me.districtField
|
|
End Get
|
|
Set
|
|
Me.districtField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyConsignorAddress))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignorAddress object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyConsignorAddress object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignorAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignorAddress)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignorAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyConsignorAddress
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyConsignorAddress)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignorAddress 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyConsignorAddress object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignorAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignorAddress)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignorAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyConsignorAddress
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyConsignee
|
|
|
|
Private identificationField As FCFCDFBodyConsigneeIdentification
|
|
|
|
Private nameField As String
|
|
|
|
Private addressField As FCFCDFBodyConsigneeAddress
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.addressField = New FCFCDFBodyConsigneeAddress()
|
|
Me.identificationField = New FCFCDFBodyConsigneeIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFBodyConsigneeIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Address() As FCFCDFBodyConsigneeAddress
|
|
Get
|
|
Return Me.addressField
|
|
End Get
|
|
Set
|
|
Me.addressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyConsignee))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignee object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyConsignee object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignee object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignee, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignee)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsignee) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyConsignee
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyConsignee)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsignee 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyConsignee object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsignee object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignee, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsignee)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignee) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyConsignee
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyConsigneeIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private subsidiaryNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me.subsidiaryNumberField
|
|
End Get
|
|
Set
|
|
Me.subsidiaryNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyConsigneeIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsigneeIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyConsigneeIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsigneeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsigneeIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsigneeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyConsigneeIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyConsigneeIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsigneeIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyConsigneeIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsigneeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsigneeIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsigneeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyConsigneeIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyConsigneeAddress
|
|
|
|
Private lineField As String
|
|
|
|
Private countryField As String
|
|
|
|
Private postcodeField As String
|
|
|
|
Private cityField As String
|
|
|
|
Private districtField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Line() As String
|
|
Get
|
|
Return Me.lineField
|
|
End Get
|
|
Set
|
|
Me.lineField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me.countryField
|
|
End Get
|
|
Set
|
|
Me.countryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me.postcodeField
|
|
End Get
|
|
Set
|
|
Me.postcodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property City() As String
|
|
Get
|
|
Return Me.cityField
|
|
End Get
|
|
Set
|
|
Me.cityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property District() As String
|
|
Get
|
|
Return Me.districtField
|
|
End Get
|
|
Set
|
|
Me.districtField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyConsigneeAddress))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsigneeAddress object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyConsigneeAddress object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsigneeAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsigneeAddress)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyConsigneeAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyConsigneeAddress
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyConsigneeAddress)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyConsigneeAddress 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyConsigneeAddress object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyConsigneeAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyConsigneeAddress)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsigneeAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyConsigneeAddress
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyAdditionalDutyReferences
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private dutyInterestedPartyField As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.dutyInterestedPartyField = New FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty()
|
|
End Sub
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DutyInterestedParty() As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
|
|
Get
|
|
Return Me.dutyInterestedPartyField
|
|
End Get
|
|
Set
|
|
Me.dutyInterestedPartyField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyAdditionalDutyReferences))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferences object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyAdditionalDutyReferences object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferences object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferences, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferences)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferences) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyAdditionalDutyReferences
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyAdditionalDutyReferences)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferences 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyAdditionalDutyReferences object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferences object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferences, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferences)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferences) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyAdditionalDutyReferences
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
|
|
|
|
Private identificationField As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
|
|
|
|
Private nameField As String
|
|
|
|
Private addressField As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.addressField = New FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress()
|
|
Me.identificationField = New FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Address() As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
|
|
Get
|
|
Return Me.addressField
|
|
End Get
|
|
Set
|
|
Me.addressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
|
|
|
|
Private lineField As String
|
|
|
|
Private countryField As String
|
|
|
|
Private postcodeField As String
|
|
|
|
Private cityField As String
|
|
|
|
Private districtField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Line() As String
|
|
Get
|
|
Return Me.lineField
|
|
End Get
|
|
Set
|
|
Me.lineField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me.countryField
|
|
End Get
|
|
Set
|
|
Me.countryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me.postcodeField
|
|
End Get
|
|
Set
|
|
Me.postcodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property City() As String
|
|
Get
|
|
Return Me.cityField
|
|
End Get
|
|
Set
|
|
Me.cityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property District() As String
|
|
Get
|
|
Return Me.districtField
|
|
End Get
|
|
Set
|
|
Me.districtField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyContainers
|
|
|
|
Private containerFlagField As String
|
|
|
|
Private containerField As List(Of FCFCDFBodyContainersContainer)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.containerField = New List(Of FCFCDFBodyContainersContainer)()
|
|
End Sub
|
|
|
|
Public Property ContainerFlag() As String
|
|
Get
|
|
Return Me.containerFlagField
|
|
End Get
|
|
Set
|
|
Me.containerFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Container() As List(Of FCFCDFBodyContainersContainer)
|
|
Get
|
|
Return Me.containerField
|
|
End Get
|
|
Set
|
|
Me.containerField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyContainers))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyContainers object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyContainers object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyContainers object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyContainers, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyContainers)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyContainers) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyContainers
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyContainers)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyContainers 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyContainers object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyContainers object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyContainers, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyContainers)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyContainers) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyContainers
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyContainersContainer
|
|
|
|
Private identificationNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property IdentificationNumber() As String
|
|
Get
|
|
Return Me.identificationNumberField
|
|
End Get
|
|
Set
|
|
Me.identificationNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyContainersContainer))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyContainersContainer object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyContainersContainer object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyContainersContainer object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyContainersContainer, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyContainersContainer)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyContainersContainer) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyContainersContainer
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyContainersContainer)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyContainersContainer 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyContainersContainer object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyContainersContainer object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyContainersContainer, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyContainersContainer)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyContainersContainer) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyContainersContainer
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyDeliveryTerms
|
|
|
|
Private codeField As String
|
|
|
|
Private descriptionField As String
|
|
|
|
Private placeField As String
|
|
|
|
Private keyField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Code() As String
|
|
Get
|
|
Return Me.codeField
|
|
End Get
|
|
Set
|
|
Me.codeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Description() As String
|
|
Get
|
|
Return Me.descriptionField
|
|
End Get
|
|
Set
|
|
Me.descriptionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Place() As String
|
|
Get
|
|
Return Me.placeField
|
|
End Get
|
|
Set
|
|
Me.placeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Key() As String
|
|
Get
|
|
Return Me.keyField
|
|
End Get
|
|
Set
|
|
Me.keyField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyDeliveryTerms))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyDeliveryTerms object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyDeliveryTerms object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyDeliveryTerms object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyDeliveryTerms)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyDeliveryTerms) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyDeliveryTerms
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyDeliveryTerms)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyDeliveryTerms 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyDeliveryTerms object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyDeliveryTerms object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyDeliveryTerms)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyDeliveryTerms) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyDeliveryTerms
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyPaymentTransaction
|
|
|
|
Private amountField As Decimal
|
|
|
|
Private amountFieldSpecified As Boolean
|
|
|
|
Private currencyCodeField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Amount() As Decimal
|
|
Get
|
|
Return Me.amountField
|
|
End Get
|
|
Set
|
|
Me.amountField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property AmountSpecified() As Boolean
|
|
Get
|
|
Return Me.amountFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.amountFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyCode() As String
|
|
Get
|
|
Return Me.currencyCodeField
|
|
End Get
|
|
Set
|
|
Me.currencyCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyPaymentTransaction))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyPaymentTransaction object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyPaymentTransaction object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyPaymentTransaction object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyPaymentTransaction)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyPaymentTransaction) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyPaymentTransaction
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyPaymentTransaction)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyPaymentTransaction 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyPaymentTransaction object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyPaymentTransaction object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyPaymentTransaction)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyPaymentTransaction) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyPaymentTransaction
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyForeignTradeStatistics
|
|
|
|
Private goodsStatusField As String
|
|
|
|
Private transactionTypeField As String
|
|
|
|
Private destinationCountryField As String
|
|
|
|
Private destinationFederalStateField As String
|
|
|
|
Private inlandTransportModeField As String
|
|
|
|
Private totalGrossMassMeasureField As Decimal
|
|
|
|
Private totalGrossMassMeasureFieldSpecified As Boolean
|
|
|
|
Private entryCustomsOfficeField As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.entryCustomsOfficeField = New FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice()
|
|
End Sub
|
|
|
|
Public Property GoodsStatus() As String
|
|
Get
|
|
Return Me.goodsStatusField
|
|
End Get
|
|
Set
|
|
Me.goodsStatusField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TransactionType() As String
|
|
Get
|
|
Return Me.transactionTypeField
|
|
End Get
|
|
Set
|
|
Me.transactionTypeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DestinationCountry() As String
|
|
Get
|
|
Return Me.destinationCountryField
|
|
End Get
|
|
Set
|
|
Me.destinationCountryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DestinationFederalState() As String
|
|
Get
|
|
Return Me.destinationFederalStateField
|
|
End Get
|
|
Set
|
|
Me.destinationFederalStateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property InlandTransportMode() As String
|
|
Get
|
|
Return Me.inlandTransportModeField
|
|
End Get
|
|
Set
|
|
Me.inlandTransportModeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TotalGrossMassMeasure() As Decimal
|
|
Get
|
|
Return Me.totalGrossMassMeasureField
|
|
End Get
|
|
Set
|
|
Me.totalGrossMassMeasureField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property TotalGrossMassMeasureSpecified() As Boolean
|
|
Get
|
|
Return Me.totalGrossMassMeasureFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.totalGrossMassMeasureFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property EntryCustomsOffice() As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
|
|
Get
|
|
Return Me.entryCustomsOfficeField
|
|
End Get
|
|
Set
|
|
Me.entryCustomsOfficeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyForeignTradeStatistics))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyForeignTradeStatistics object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyForeignTradeStatistics object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyForeignTradeStatistics object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyForeignTradeStatistics)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyForeignTradeStatistics) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyForeignTradeStatistics
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyForeignTradeStatistics)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyForeignTradeStatistics 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyForeignTradeStatistics object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyForeignTradeStatistics object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyForeignTradeStatistics)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyForeignTradeStatistics) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyForeignTradeStatistics
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValue
|
|
|
|
Private formerDecisionsField As String
|
|
|
|
Private vendorField As FCFCDFBodyCustomsValueVendor
|
|
|
|
Private vendeeField As FCFCDFBodyCustomsValueVendee
|
|
|
|
Private affiliationField As FCFCDFBodyCustomsValueAffiliation
|
|
|
|
Private restrictionOrConditionField As FCFCDFBodyCustomsValueRestrictionOrCondition
|
|
|
|
Private licenseFeeField As FCFCDFBodyCustomsValueLicenseFee
|
|
|
|
Private resaleField As FCFCDFBodyCustomsValueResale
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.resaleField = New FCFCDFBodyCustomsValueResale()
|
|
Me.licenseFeeField = New FCFCDFBodyCustomsValueLicenseFee()
|
|
Me.restrictionOrConditionField = New FCFCDFBodyCustomsValueRestrictionOrCondition()
|
|
Me.affiliationField = New FCFCDFBodyCustomsValueAffiliation()
|
|
Me.vendeeField = New FCFCDFBodyCustomsValueVendee()
|
|
Me.vendorField = New FCFCDFBodyCustomsValueVendor()
|
|
End Sub
|
|
|
|
Public Property FormerDecisions() As String
|
|
Get
|
|
Return Me.formerDecisionsField
|
|
End Get
|
|
Set
|
|
Me.formerDecisionsField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Vendor() As FCFCDFBodyCustomsValueVendor
|
|
Get
|
|
Return Me.vendorField
|
|
End Get
|
|
Set
|
|
Me.vendorField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Vendee() As FCFCDFBodyCustomsValueVendee
|
|
Get
|
|
Return Me.vendeeField
|
|
End Get
|
|
Set
|
|
Me.vendeeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Affiliation() As FCFCDFBodyCustomsValueAffiliation
|
|
Get
|
|
Return Me.affiliationField
|
|
End Get
|
|
Set
|
|
Me.affiliationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property RestrictionOrCondition() As FCFCDFBodyCustomsValueRestrictionOrCondition
|
|
Get
|
|
Return Me.restrictionOrConditionField
|
|
End Get
|
|
Set
|
|
Me.restrictionOrConditionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LicenseFee() As FCFCDFBodyCustomsValueLicenseFee
|
|
Get
|
|
Return Me.licenseFeeField
|
|
End Get
|
|
Set
|
|
Me.licenseFeeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Resale() As FCFCDFBodyCustomsValueResale
|
|
Get
|
|
Return Me.resaleField
|
|
End Get
|
|
Set
|
|
Me.resaleField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValue))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValue object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValue object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValue object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValue, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValue)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValue) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValue
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValue)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValue 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValue object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValue object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValue, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValue)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValue) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValue
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueVendor
|
|
|
|
Private identificationField As FCFCDFBodyCustomsValueVendorIdentification
|
|
|
|
Private nameField As String
|
|
|
|
Private addressField As FCFCDFBodyCustomsValueVendorAddress
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.addressField = New FCFCDFBodyCustomsValueVendorAddress()
|
|
Me.identificationField = New FCFCDFBodyCustomsValueVendorIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFBodyCustomsValueVendorIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Address() As FCFCDFBodyCustomsValueVendorAddress
|
|
Get
|
|
Return Me.addressField
|
|
End Get
|
|
Set
|
|
Me.addressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueVendor))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendor object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueVendor object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendor object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendor)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendor) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueVendor
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueVendor)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendor 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueVendor object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendor object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendor)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendor) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueVendor
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueVendorIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueVendorIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendorIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueVendorIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendorIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendorIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendorIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueVendorIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueVendorIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendorIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueVendorIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendorIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendorIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendorIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueVendorIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueVendorAddress
|
|
|
|
Private lineField As String
|
|
|
|
Private countryField As String
|
|
|
|
Private postcodeField As String
|
|
|
|
Private cityField As String
|
|
|
|
Private districtField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Line() As String
|
|
Get
|
|
Return Me.lineField
|
|
End Get
|
|
Set
|
|
Me.lineField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me.countryField
|
|
End Get
|
|
Set
|
|
Me.countryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me.postcodeField
|
|
End Get
|
|
Set
|
|
Me.postcodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property City() As String
|
|
Get
|
|
Return Me.cityField
|
|
End Get
|
|
Set
|
|
Me.cityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property District() As String
|
|
Get
|
|
Return Me.districtField
|
|
End Get
|
|
Set
|
|
Me.districtField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueVendorAddress))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendorAddress object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueVendorAddress object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendorAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendorAddress)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendorAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueVendorAddress
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueVendorAddress)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendorAddress 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueVendorAddress object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendorAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendorAddress)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendorAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueVendorAddress
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueVendee
|
|
|
|
Private identificationField As FCFCDFBodyCustomsValueVendeeIdentification
|
|
|
|
Private nameField As String
|
|
|
|
Private addressField As FCFCDFBodyCustomsValueVendeeAddress
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.addressField = New FCFCDFBodyCustomsValueVendeeAddress()
|
|
Me.identificationField = New FCFCDFBodyCustomsValueVendeeIdentification()
|
|
End Sub
|
|
|
|
Public Property Identification() As FCFCDFBodyCustomsValueVendeeIdentification
|
|
Get
|
|
Return Me.identificationField
|
|
End Get
|
|
Set
|
|
Me.identificationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me.nameField
|
|
End Get
|
|
Set
|
|
Me.nameField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Address() As FCFCDFBodyCustomsValueVendeeAddress
|
|
Get
|
|
Return Me.addressField
|
|
End Get
|
|
Set
|
|
Me.addressField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueVendee))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendee object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueVendee object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendee object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendee)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendee) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueVendee
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueVendee)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendee 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueVendee object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendee object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendee)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendee) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueVendee
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueVendeeIdentification
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueVendeeIdentification))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendeeIdentification object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueVendeeIdentification object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendeeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeIdentification)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendeeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueVendeeIdentification
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueVendeeIdentification)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendeeIdentification 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueVendeeIdentification object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendeeIdentification object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeIdentification)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendeeIdentification) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueVendeeIdentification
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueVendeeAddress
|
|
|
|
Private lineField As String
|
|
|
|
Private countryField As String
|
|
|
|
Private postcodeField As String
|
|
|
|
Private cityField As String
|
|
|
|
Private districtField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Line() As String
|
|
Get
|
|
Return Me.lineField
|
|
End Get
|
|
Set
|
|
Me.lineField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me.countryField
|
|
End Get
|
|
Set
|
|
Me.countryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me.postcodeField
|
|
End Get
|
|
Set
|
|
Me.postcodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property City() As String
|
|
Get
|
|
Return Me.cityField
|
|
End Get
|
|
Set
|
|
Me.cityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property District() As String
|
|
Get
|
|
Return Me.districtField
|
|
End Get
|
|
Set
|
|
Me.districtField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueVendeeAddress))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendeeAddress object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueVendeeAddress object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendeeAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeAddress)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueVendeeAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueVendeeAddress
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueVendeeAddress)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueVendeeAddress 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueVendeeAddress object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueVendeeAddress object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeAddress)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendeeAddress) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueVendeeAddress
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueAffiliation
|
|
|
|
Private typeField As String
|
|
|
|
Private descriptionField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Description() As String
|
|
Get
|
|
Return Me.descriptionField
|
|
End Get
|
|
Set
|
|
Me.descriptionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueAffiliation))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueAffiliation object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueAffiliation object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueAffiliation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueAffiliation)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueAffiliation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueAffiliation
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueAffiliation)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueAffiliation 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueAffiliation object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueAffiliation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueAffiliation)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueAffiliation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueAffiliation
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueRestrictionOrCondition
|
|
|
|
Private restrictionFlagField As String
|
|
|
|
Private conditionFlagField As String
|
|
|
|
Private descriptionField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property RestrictionFlag() As String
|
|
Get
|
|
Return Me.restrictionFlagField
|
|
End Get
|
|
Set
|
|
Me.restrictionFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ConditionFlag() As String
|
|
Get
|
|
Return Me.conditionFlagField
|
|
End Get
|
|
Set
|
|
Me.conditionFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Description() As String
|
|
Get
|
|
Return Me.descriptionField
|
|
End Get
|
|
Set
|
|
Me.descriptionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueRestrictionOrCondition))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueRestrictionOrCondition object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueRestrictionOrCondition object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueRestrictionOrCondition object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueRestrictionOrCondition)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueRestrictionOrCondition) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueRestrictionOrCondition
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueRestrictionOrCondition)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueRestrictionOrCondition 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueRestrictionOrCondition object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueRestrictionOrCondition object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueRestrictionOrCondition)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueRestrictionOrCondition) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueRestrictionOrCondition
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueLicenseFee
|
|
|
|
Private licenseFeeFlagField As String
|
|
|
|
Private descriptionField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property LicenseFeeFlag() As String
|
|
Get
|
|
Return Me.licenseFeeFlagField
|
|
End Get
|
|
Set
|
|
Me.licenseFeeFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Description() As String
|
|
Get
|
|
Return Me.descriptionField
|
|
End Get
|
|
Set
|
|
Me.descriptionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueLicenseFee))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueLicenseFee object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueLicenseFee object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueLicenseFee object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueLicenseFee)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueLicenseFee) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueLicenseFee
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueLicenseFee)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueLicenseFee 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueLicenseFee object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueLicenseFee object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueLicenseFee)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueLicenseFee) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueLicenseFee
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyCustomsValueResale
|
|
|
|
Private resaleFlagField As String
|
|
|
|
Private descriptionField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ResaleFlag() As String
|
|
Get
|
|
Return Me.resaleFlagField
|
|
End Get
|
|
Set
|
|
Me.resaleFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Description() As String
|
|
Get
|
|
Return Me.descriptionField
|
|
End Get
|
|
Set
|
|
Me.descriptionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyCustomsValueResale))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueResale object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyCustomsValueResale object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueResale object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueResale)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyCustomsValueResale) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyCustomsValueResale
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyCustomsValueResale)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyCustomsValueResale 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyCustomsValueResale object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyCustomsValueResale object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyCustomsValueResale)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueResale) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyCustomsValueResale
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyDocument
|
|
|
|
Private divisionField As FCFCDFBodyDocumentDivision
|
|
|
|
Private typeField As String
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private issuingDateField As Date
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Division() As FCFCDFBodyDocumentDivision
|
|
Get
|
|
Return Me.divisionField
|
|
End Get
|
|
Set
|
|
Me.divisionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property IssuingDate() As Date
|
|
Get
|
|
Return Me.issuingDateField
|
|
End Get
|
|
Set
|
|
Me.issuingDateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyDocument))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyDocument object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyDocument object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyDocument object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyDocument, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyDocument)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyDocument) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyDocument
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyDocument)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyDocument 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyDocument object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyDocument object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyDocument, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyDocument)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyDocument) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyDocument
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Public Enum FCFCDFBodyDocumentDivision
|
|
|
|
'''<remarks/>
|
|
<System.Xml.Serialization.XmlEnumAttribute("4")>
|
|
Item4
|
|
End Enum
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItem
|
|
|
|
Private sequenceNumberField As String
|
|
|
|
Private procedureField As FCFCDFBodyGoodsItemProcedure
|
|
|
|
Private cessionManagementFlagField As String
|
|
|
|
Private goodsDescriptionField As String
|
|
|
|
Private invoiceAmountField As Decimal
|
|
|
|
Private netMassMeasureField As Decimal
|
|
|
|
Private tobaccoRevenueStampNumberField As String
|
|
|
|
Private originCountryField As String
|
|
|
|
Private preferentialOriginCountryField As String
|
|
|
|
Private supplementaryInformationField As String
|
|
|
|
Private conditionField As String
|
|
|
|
Private commodityCodeField As FCFCDFBodyGoodsItemCommodityCode
|
|
|
|
Private additionalProcedureField As List(Of FCFCDFBodyGoodsItemAdditionalProcedure)
|
|
|
|
Private supplementaryCodesField As List(Of FCFCDFBodyGoodsItemSupplementaryCodes)
|
|
|
|
Private packageField As FCFCDFBodyGoodsItemPackage
|
|
|
|
Private foreignTradeStatisticsField As FCFCDFBodyGoodsItemForeignTradeStatistics
|
|
|
|
Private customsValueField As FCFCDFBodyGoodsItemCustomsValue
|
|
|
|
Private assessmentField As FCFCDFBodyGoodsItemAssessment
|
|
|
|
Private exciseDutyField As List(Of FCFCDFBodyGoodsItemExciseDuty)
|
|
|
|
Private preferentialTreatmentField As FCFCDFBodyGoodsItemPreferentialTreatment
|
|
|
|
Private specialCaseField As List(Of FCFCDFBodyGoodsItemSpecialCase)
|
|
|
|
Private documentField As List(Of FCFCDFBodyGoodsItemDocument)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.documentField = New List(Of FCFCDFBodyGoodsItemDocument)()
|
|
Me.specialCaseField = New List(Of FCFCDFBodyGoodsItemSpecialCase)()
|
|
Me.preferentialTreatmentField = New FCFCDFBodyGoodsItemPreferentialTreatment()
|
|
Me.exciseDutyField = New List(Of FCFCDFBodyGoodsItemExciseDuty)()
|
|
Me.assessmentField = New FCFCDFBodyGoodsItemAssessment()
|
|
Me.customsValueField = New FCFCDFBodyGoodsItemCustomsValue()
|
|
Me.foreignTradeStatisticsField = New FCFCDFBodyGoodsItemForeignTradeStatistics()
|
|
Me.packageField = New FCFCDFBodyGoodsItemPackage()
|
|
Me.supplementaryCodesField = New List(Of FCFCDFBodyGoodsItemSupplementaryCodes)()
|
|
Me.additionalProcedureField = New List(Of FCFCDFBodyGoodsItemAdditionalProcedure)()
|
|
Me.commodityCodeField = New FCFCDFBodyGoodsItemCommodityCode()
|
|
Me.procedureField = New FCFCDFBodyGoodsItemProcedure()
|
|
End Sub
|
|
|
|
Public Property SequenceNumber() As String
|
|
Get
|
|
Return Me.sequenceNumberField
|
|
End Get
|
|
Set
|
|
Me.sequenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Procedure() As FCFCDFBodyGoodsItemProcedure
|
|
Get
|
|
Return Me.procedureField
|
|
End Get
|
|
Set
|
|
Me.procedureField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CessionManagementFlag() As String
|
|
Get
|
|
Return Me.cessionManagementFlagField
|
|
End Get
|
|
Set
|
|
Me.cessionManagementFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GoodsDescription() As String
|
|
Get
|
|
Return Me.goodsDescriptionField
|
|
End Get
|
|
Set
|
|
Me.goodsDescriptionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property InvoiceAmount() As Decimal
|
|
Get
|
|
Return Me.invoiceAmountField
|
|
End Get
|
|
Set
|
|
Me.invoiceAmountField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property NetMassMeasure() As Decimal
|
|
Get
|
|
Return Me.netMassMeasureField
|
|
End Get
|
|
Set
|
|
Me.netMassMeasureField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TobaccoRevenueStampNumber() As String
|
|
Get
|
|
Return Me.tobaccoRevenueStampNumberField
|
|
End Get
|
|
Set
|
|
Me.tobaccoRevenueStampNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OriginCountry() As String
|
|
Get
|
|
Return Me.originCountryField
|
|
End Get
|
|
Set
|
|
Me.originCountryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PreferentialOriginCountry() As String
|
|
Get
|
|
Return Me.preferentialOriginCountryField
|
|
End Get
|
|
Set
|
|
Me.preferentialOriginCountryField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SupplementaryInformation() As String
|
|
Get
|
|
Return Me.supplementaryInformationField
|
|
End Get
|
|
Set
|
|
Me.supplementaryInformationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Condition() As String
|
|
Get
|
|
Return Me.conditionField
|
|
End Get
|
|
Set
|
|
Me.conditionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CommodityCode() As FCFCDFBodyGoodsItemCommodityCode
|
|
Get
|
|
Return Me.commodityCodeField
|
|
End Get
|
|
Set
|
|
Me.commodityCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AdditionalProcedure() As List(Of FCFCDFBodyGoodsItemAdditionalProcedure)
|
|
Get
|
|
Return Me.additionalProcedureField
|
|
End Get
|
|
Set
|
|
Me.additionalProcedureField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SupplementaryCodes() As List(Of FCFCDFBodyGoodsItemSupplementaryCodes)
|
|
Get
|
|
Return Me.supplementaryCodesField
|
|
End Get
|
|
Set
|
|
Me.supplementaryCodesField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Package() As FCFCDFBodyGoodsItemPackage
|
|
Get
|
|
Return Me.packageField
|
|
End Get
|
|
Set
|
|
Me.packageField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ForeignTradeStatistics() As FCFCDFBodyGoodsItemForeignTradeStatistics
|
|
Get
|
|
Return Me.foreignTradeStatisticsField
|
|
End Get
|
|
Set
|
|
Me.foreignTradeStatisticsField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CustomsValue() As FCFCDFBodyGoodsItemCustomsValue
|
|
Get
|
|
Return Me.customsValueField
|
|
End Get
|
|
Set
|
|
Me.customsValueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Assessment() As FCFCDFBodyGoodsItemAssessment
|
|
Get
|
|
Return Me.assessmentField
|
|
End Get
|
|
Set
|
|
Me.assessmentField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ExciseDuty() As List(Of FCFCDFBodyGoodsItemExciseDuty)
|
|
Get
|
|
Return Me.exciseDutyField
|
|
End Get
|
|
Set
|
|
Me.exciseDutyField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PreferentialTreatment() As FCFCDFBodyGoodsItemPreferentialTreatment
|
|
Get
|
|
Return Me.preferentialTreatmentField
|
|
End Get
|
|
Set
|
|
Me.preferentialTreatmentField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SpecialCase() As List(Of FCFCDFBodyGoodsItemSpecialCase)
|
|
Get
|
|
Return Me.specialCaseField
|
|
End Get
|
|
Set
|
|
Me.specialCaseField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Document() As List(Of FCFCDFBodyGoodsItemDocument)
|
|
Get
|
|
Return Me.documentField
|
|
End Get
|
|
Set
|
|
Me.documentField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItem))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItem object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItem object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItem)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItem
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItem)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItem 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItem object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItem object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItem, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItem)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItem) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItem
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemProcedure
|
|
|
|
Private requestedPreviousProcedureField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property RequestedPreviousProcedure() As String
|
|
Get
|
|
Return Me.requestedPreviousProcedureField
|
|
End Get
|
|
Set
|
|
Me.requestedPreviousProcedureField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemProcedure))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemProcedure object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemProcedure object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemProcedure object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemProcedure, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemProcedure)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemProcedure) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemProcedure
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemProcedure)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemProcedure 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemProcedure object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemProcedure object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemProcedure, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemProcedure)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemProcedure) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemProcedure
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemCommodityCode
|
|
|
|
Private commodityCodeField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property CommodityCode() As String
|
|
Get
|
|
Return Me.commodityCodeField
|
|
End Get
|
|
Set
|
|
Me.commodityCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemCommodityCode))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCommodityCode object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemCommodityCode object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCommodityCode object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCommodityCode)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCommodityCode) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemCommodityCode
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemCommodityCode)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCommodityCode 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemCommodityCode object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCommodityCode object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCommodityCode)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCommodityCode) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemCommodityCode
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemAdditionalProcedure
|
|
|
|
Private codeField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Code() As String
|
|
Get
|
|
Return Me.codeField
|
|
End Get
|
|
Set
|
|
Me.codeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemAdditionalProcedure))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAdditionalProcedure object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemAdditionalProcedure object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAdditionalProcedure object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAdditionalProcedure, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAdditionalProcedure)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAdditionalProcedure) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemAdditionalProcedure
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemAdditionalProcedure)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAdditionalProcedure 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemAdditionalProcedure object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAdditionalProcedure object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAdditionalProcedure, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAdditionalProcedure)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAdditionalProcedure) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemAdditionalProcedure
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemSupplementaryCodes
|
|
|
|
Private codeField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Code() As String
|
|
Get
|
|
Return Me.codeField
|
|
End Get
|
|
Set
|
|
Me.codeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemSupplementaryCodes))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemSupplementaryCodes object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemSupplementaryCodes object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemSupplementaryCodes object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemSupplementaryCodes, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemSupplementaryCodes)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemSupplementaryCodes) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemSupplementaryCodes
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemSupplementaryCodes)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemSupplementaryCodes 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemSupplementaryCodes object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemSupplementaryCodes object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemSupplementaryCodes, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemSupplementaryCodes)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemSupplementaryCodes) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemSupplementaryCodes
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemPackage
|
|
|
|
Private kindField As String
|
|
|
|
Private quantityField As String
|
|
|
|
Private marksNumbersField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Kind() As String
|
|
Get
|
|
Return Me.kindField
|
|
End Get
|
|
Set
|
|
Me.kindField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MarksNumbers() As String
|
|
Get
|
|
Return Me.marksNumbersField
|
|
End Get
|
|
Set
|
|
Me.marksNumbersField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemPackage))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPackage object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemPackage object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPackage object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPackage, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPackage)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPackage) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemPackage
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemPackage)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPackage 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemPackage object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPackage object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPackage, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPackage)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPackage) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemPackage
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemForeignTradeStatistics
|
|
|
|
Private quantityField As String
|
|
|
|
Private grossMassMeasureField As Decimal
|
|
|
|
Private grossMassMeasureFieldSpecified As Boolean
|
|
|
|
Private amountField As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.amountField = New FCFCDFBodyGoodsItemForeignTradeStatisticsAmount()
|
|
End Sub
|
|
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property GrossMassMeasure() As Decimal
|
|
Get
|
|
Return Me.grossMassMeasureField
|
|
End Get
|
|
Set
|
|
Me.grossMassMeasureField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property GrossMassMeasureSpecified() As Boolean
|
|
Get
|
|
Return Me.grossMassMeasureFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.grossMassMeasureFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Amount() As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
|
|
Get
|
|
Return Me.amountField
|
|
End Get
|
|
Set
|
|
Me.amountField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemForeignTradeStatistics))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemForeignTradeStatistics object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemForeignTradeStatistics object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatistics object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatistics)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatistics) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemForeignTradeStatistics
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemForeignTradeStatistics)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemForeignTradeStatistics 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemForeignTradeStatistics object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatistics object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatistics)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatistics) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemForeignTradeStatistics
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
|
|
|
|
Private quantityField As Decimal
|
|
|
|
Private measurementUnitField As String
|
|
|
|
Private qualifierField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Quantity() As Decimal
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me.measurementUnitField
|
|
End Get
|
|
Set
|
|
Me.measurementUnitField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me.qualifierField
|
|
End Get
|
|
Set
|
|
Me.qualifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemForeignTradeStatisticsAmount))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatisticsAmount)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemForeignTradeStatisticsAmount)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemForeignTradeStatisticsAmount 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatisticsAmount)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemCustomsValue
|
|
|
|
Private departureAirportField As String
|
|
|
|
Private destinationPlaceField As String
|
|
|
|
Private additionDeductionDescriptionField As String
|
|
|
|
Private netPriceField As FCFCDFBodyGoodsItemCustomsValueNetPrice
|
|
|
|
Private indirectPaymentField As FCFCDFBodyGoodsItemCustomsValueIndirectPayment
|
|
|
|
Private airFreightCostsField As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
|
|
|
|
Private additionDeductionField As List(Of FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.additionDeductionField = New List(Of FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)()
|
|
Me.airFreightCostsField = New FCFCDFBodyGoodsItemCustomsValueAirFreightCosts()
|
|
Me.indirectPaymentField = New FCFCDFBodyGoodsItemCustomsValueIndirectPayment()
|
|
Me.netPriceField = New FCFCDFBodyGoodsItemCustomsValueNetPrice()
|
|
End Sub
|
|
|
|
Public Property DepartureAirport() As String
|
|
Get
|
|
Return Me.departureAirportField
|
|
End Get
|
|
Set
|
|
Me.departureAirportField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DestinationPlace() As String
|
|
Get
|
|
Return Me.destinationPlaceField
|
|
End Get
|
|
Set
|
|
Me.destinationPlaceField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AdditionDeductionDescription() As String
|
|
Get
|
|
Return Me.additionDeductionDescriptionField
|
|
End Get
|
|
Set
|
|
Me.additionDeductionDescriptionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property NetPrice() As FCFCDFBodyGoodsItemCustomsValueNetPrice
|
|
Get
|
|
Return Me.netPriceField
|
|
End Get
|
|
Set
|
|
Me.netPriceField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property IndirectPayment() As FCFCDFBodyGoodsItemCustomsValueIndirectPayment
|
|
Get
|
|
Return Me.indirectPaymentField
|
|
End Get
|
|
Set
|
|
Me.indirectPaymentField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AirFreightCosts() As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
|
|
Get
|
|
Return Me.airFreightCostsField
|
|
End Get
|
|
Set
|
|
Me.airFreightCostsField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AdditionDeduction() As List(Of FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
|
|
Get
|
|
Return Me.additionDeductionField
|
|
End Get
|
|
Set
|
|
Me.additionDeductionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemCustomsValue))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValue object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemCustomsValue object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValue object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValue, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValue)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValue) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemCustomsValue
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemCustomsValue)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValue 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemCustomsValue object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValue object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValue, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValue)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValue) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemCustomsValue
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemCustomsValueNetPrice
|
|
|
|
Private valueField As Decimal
|
|
|
|
Private currencyCodeField As String
|
|
|
|
Private currencyRateAgreedFlagField As String
|
|
|
|
Private currencyRateField As Decimal
|
|
|
|
Private currencyRateFieldSpecified As Boolean
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Value() As Decimal
|
|
Get
|
|
Return Me.valueField
|
|
End Get
|
|
Set
|
|
Me.valueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyCode() As String
|
|
Get
|
|
Return Me.currencyCodeField
|
|
End Get
|
|
Set
|
|
Me.currencyCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateAgreedFlag() As String
|
|
Get
|
|
Return Me.currencyRateAgreedFlagField
|
|
End Get
|
|
Set
|
|
Me.currencyRateAgreedFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRate() As Decimal
|
|
Get
|
|
Return Me.currencyRateField
|
|
End Get
|
|
Set
|
|
Me.currencyRateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property CurrencyRateSpecified() As Boolean
|
|
Get
|
|
Return Me.currencyRateFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.currencyRateFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueNetPrice))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueNetPrice object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemCustomsValueNetPrice object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueNetPrice object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueNetPrice, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueNetPrice)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueNetPrice) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemCustomsValueNetPrice
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemCustomsValueNetPrice)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueNetPrice 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemCustomsValueNetPrice object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueNetPrice object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueNetPrice, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueNetPrice)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueNetPrice) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemCustomsValueNetPrice
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemCustomsValueIndirectPayment
|
|
|
|
Private valueField As Decimal
|
|
|
|
Private currencyCodeField As String
|
|
|
|
Private currencyRateAgreedFlagField As String
|
|
|
|
Private currencyRateField As Decimal
|
|
|
|
Private currencyRateFieldSpecified As Boolean
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Value() As Decimal
|
|
Get
|
|
Return Me.valueField
|
|
End Get
|
|
Set
|
|
Me.valueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyCode() As String
|
|
Get
|
|
Return Me.currencyCodeField
|
|
End Get
|
|
Set
|
|
Me.currencyCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateAgreedFlag() As String
|
|
Get
|
|
Return Me.currencyRateAgreedFlagField
|
|
End Get
|
|
Set
|
|
Me.currencyRateAgreedFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRate() As Decimal
|
|
Get
|
|
Return Me.currencyRateField
|
|
End Get
|
|
Set
|
|
Me.currencyRateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property CurrencyRateSpecified() As Boolean
|
|
Get
|
|
Return Me.currencyRateFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.currencyRateFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueIndirectPayment))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueIndirectPayment object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemCustomsValueIndirectPayment object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueIndirectPayment object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueIndirectPayment, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueIndirectPayment)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueIndirectPayment) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemCustomsValueIndirectPayment
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemCustomsValueIndirectPayment)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueIndirectPayment 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueIndirectPayment object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueIndirectPayment, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueIndirectPayment)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueIndirectPayment) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemCustomsValueIndirectPayment
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
|
|
|
|
Private valueField As Decimal
|
|
|
|
Private currencyCodeField As String
|
|
|
|
Private currencyRateIATAField As String
|
|
|
|
Private currencyRateAgreedFlagField As String
|
|
|
|
Private currencyRateField As Decimal
|
|
|
|
Private currencyRateFieldSpecified As Boolean
|
|
|
|
Private currencyRateDateField As Date
|
|
|
|
Private currencyRateDateFieldSpecified As Boolean
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Value() As Decimal
|
|
Get
|
|
Return Me.valueField
|
|
End Get
|
|
Set
|
|
Me.valueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyCode() As String
|
|
Get
|
|
Return Me.currencyCodeField
|
|
End Get
|
|
Set
|
|
Me.currencyCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateIATA() As String
|
|
Get
|
|
Return Me.currencyRateIATAField
|
|
End Get
|
|
Set
|
|
Me.currencyRateIATAField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateAgreedFlag() As String
|
|
Get
|
|
Return Me.currencyRateAgreedFlagField
|
|
End Get
|
|
Set
|
|
Me.currencyRateAgreedFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRate() As Decimal
|
|
Get
|
|
Return Me.currencyRateField
|
|
End Get
|
|
Set
|
|
Me.currencyRateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property CurrencyRateSpecified() As Boolean
|
|
Get
|
|
Return Me.currencyRateFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.currencyRateFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateDate() As Date
|
|
Get
|
|
Return Me.currencyRateDateField
|
|
End Get
|
|
Set
|
|
Me.currencyRateDateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property CurrencyRateDateSpecified() As Boolean
|
|
Get
|
|
Return Me.currencyRateDateFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.currencyRateDateFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueAirFreightCosts))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAirFreightCosts)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemCustomsValueAirFreightCosts)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueAirFreightCosts 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAirFreightCosts)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
|
|
|
|
Private typeField As String
|
|
|
|
Private valueField As Decimal
|
|
|
|
Private currencyCodeField As String
|
|
|
|
Private currencyRateIATAField As String
|
|
|
|
Private currencyRateAgreedFlagField As String
|
|
|
|
Private currencyRateField As Decimal
|
|
|
|
Private currencyRateFieldSpecified As Boolean
|
|
|
|
Private currencyRateDateField As Date
|
|
|
|
Private currencyRateDateFieldSpecified As Boolean
|
|
|
|
Private percentageField As Decimal
|
|
|
|
Private percentageFieldSpecified As Boolean
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Value() As Decimal
|
|
Get
|
|
Return Me.valueField
|
|
End Get
|
|
Set
|
|
Me.valueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyCode() As String
|
|
Get
|
|
Return Me.currencyCodeField
|
|
End Get
|
|
Set
|
|
Me.currencyCodeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateIATA() As String
|
|
Get
|
|
Return Me.currencyRateIATAField
|
|
End Get
|
|
Set
|
|
Me.currencyRateIATAField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateAgreedFlag() As String
|
|
Get
|
|
Return Me.currencyRateAgreedFlagField
|
|
End Get
|
|
Set
|
|
Me.currencyRateAgreedFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRate() As Decimal
|
|
Get
|
|
Return Me.currencyRateField
|
|
End Get
|
|
Set
|
|
Me.currencyRateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property CurrencyRateSpecified() As Boolean
|
|
Get
|
|
Return Me.currencyRateFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.currencyRateFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property CurrencyRateDate() As Date
|
|
Get
|
|
Return Me.currencyRateDateField
|
|
End Get
|
|
Set
|
|
Me.currencyRateDateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property CurrencyRateDateSpecified() As Boolean
|
|
Get
|
|
Return Me.currencyRateDateFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.currencyRateDateFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Percentage() As Decimal
|
|
Get
|
|
Return Me.percentageField
|
|
End Get
|
|
Set
|
|
Me.percentageField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property PercentageSpecified() As Boolean
|
|
Get
|
|
Return Me.percentageFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.percentageFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueAdditionDeduction))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemCustomsValueAdditionDeduction 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemAssessment
|
|
|
|
Private customsValueField As Decimal
|
|
|
|
Private customsValueFieldSpecified As Boolean
|
|
|
|
Private outwardProcessingFeeField As Decimal
|
|
|
|
Private outwardProcessingFeeFieldSpecified As Boolean
|
|
|
|
Private taxCostsField As Decimal
|
|
|
|
Private taxCostsFieldSpecified As Boolean
|
|
|
|
Private amountField As List(Of FCFCDFBodyGoodsItemAssessmentAmount)
|
|
|
|
Private specificRateField As List(Of FCFCDFBodyGoodsItemAssessmentSpecificRate)
|
|
|
|
Private contentInformationField As List(Of FCFCDFBodyGoodsItemAssessmentContentInformation)
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.contentInformationField = New List(Of FCFCDFBodyGoodsItemAssessmentContentInformation)()
|
|
Me.specificRateField = New List(Of FCFCDFBodyGoodsItemAssessmentSpecificRate)()
|
|
Me.amountField = New List(Of FCFCDFBodyGoodsItemAssessmentAmount)()
|
|
End Sub
|
|
|
|
Public Property CustomsValue() As Decimal
|
|
Get
|
|
Return Me.customsValueField
|
|
End Get
|
|
Set
|
|
Me.customsValueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property CustomsValueSpecified() As Boolean
|
|
Get
|
|
Return Me.customsValueFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.customsValueFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OutwardProcessingFee() As Decimal
|
|
Get
|
|
Return Me.outwardProcessingFeeField
|
|
End Get
|
|
Set
|
|
Me.outwardProcessingFeeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property OutwardProcessingFeeSpecified() As Boolean
|
|
Get
|
|
Return Me.outwardProcessingFeeFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.outwardProcessingFeeFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TaxCosts() As Decimal
|
|
Get
|
|
Return Me.taxCostsField
|
|
End Get
|
|
Set
|
|
Me.taxCostsField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property TaxCostsSpecified() As Boolean
|
|
Get
|
|
Return Me.taxCostsFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.taxCostsFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Amount() As List(Of FCFCDFBodyGoodsItemAssessmentAmount)
|
|
Get
|
|
Return Me.amountField
|
|
End Get
|
|
Set
|
|
Me.amountField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SpecificRate() As List(Of FCFCDFBodyGoodsItemAssessmentSpecificRate)
|
|
Get
|
|
Return Me.specificRateField
|
|
End Get
|
|
Set
|
|
Me.specificRateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ContentInformation() As List(Of FCFCDFBodyGoodsItemAssessmentContentInformation)
|
|
Get
|
|
Return Me.contentInformationField
|
|
End Get
|
|
Set
|
|
Me.contentInformationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemAssessment))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessment object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemAssessment object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessment object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessment, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessment)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessment) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemAssessment
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemAssessment)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessment 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemAssessment object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessment object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessment, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessment)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessment) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemAssessment
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemAssessmentAmount
|
|
|
|
Private quantityField As Decimal
|
|
|
|
Private measurementUnitField As String
|
|
|
|
Private qualifierField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Quantity() As Decimal
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me.measurementUnitField
|
|
End Get
|
|
Set
|
|
Me.measurementUnitField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me.qualifierField
|
|
End Get
|
|
Set
|
|
Me.qualifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemAssessmentAmount))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessmentAmount object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemAssessmentAmount object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessmentAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentAmount)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemAssessmentAmount
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemAssessmentAmount)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessmentAmount 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemAssessmentAmount object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessmentAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentAmount)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemAssessmentAmount
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemAssessmentSpecificRate
|
|
|
|
Private typeField As String
|
|
|
|
Private valueField As Decimal
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Value() As Decimal
|
|
Get
|
|
Return Me.valueField
|
|
End Get
|
|
Set
|
|
Me.valueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemAssessmentSpecificRate))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessmentSpecificRate object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemAssessmentSpecificRate object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessmentSpecificRate object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentSpecificRate, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentSpecificRate)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentSpecificRate) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemAssessmentSpecificRate
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemAssessmentSpecificRate)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessmentSpecificRate 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemAssessmentSpecificRate object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessmentSpecificRate object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentSpecificRate, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentSpecificRate)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentSpecificRate) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemAssessmentSpecificRate
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemAssessmentContentInformation
|
|
|
|
Private typeField As String
|
|
|
|
Private degreePercentageField As Decimal
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DegreePercentage() As Decimal
|
|
Get
|
|
Return Me.degreePercentageField
|
|
End Get
|
|
Set
|
|
Me.degreePercentageField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemAssessmentContentInformation))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessmentContentInformation object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemAssessmentContentInformation object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessmentContentInformation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentContentInformation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentContentInformation)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentContentInformation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemAssessmentContentInformation
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemAssessmentContentInformation)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemAssessmentContentInformation 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemAssessmentContentInformation object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemAssessmentContentInformation object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentContentInformation, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentContentInformation)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentContentInformation) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemAssessmentContentInformation
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemExciseDuty
|
|
|
|
Private codeField As String
|
|
|
|
Private degreePercentageField As Decimal
|
|
|
|
Private degreePercentageFieldSpecified As Boolean
|
|
|
|
Private valueField As Decimal
|
|
|
|
Private valueFieldSpecified As Boolean
|
|
|
|
Private amountField As FCFCDFBodyGoodsItemExciseDutyAmount
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.amountField = New FCFCDFBodyGoodsItemExciseDutyAmount()
|
|
End Sub
|
|
|
|
Public Property Code() As String
|
|
Get
|
|
Return Me.codeField
|
|
End Get
|
|
Set
|
|
Me.codeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DegreePercentage() As Decimal
|
|
Get
|
|
Return Me.degreePercentageField
|
|
End Get
|
|
Set
|
|
Me.degreePercentageField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property DegreePercentageSpecified() As Boolean
|
|
Get
|
|
Return Me.degreePercentageFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.degreePercentageFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Value() As Decimal
|
|
Get
|
|
Return Me.valueField
|
|
End Get
|
|
Set
|
|
Me.valueField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property ValueSpecified() As Boolean
|
|
Get
|
|
Return Me.valueFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.valueFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Amount() As FCFCDFBodyGoodsItemExciseDutyAmount
|
|
Get
|
|
Return Me.amountField
|
|
End Get
|
|
Set
|
|
Me.amountField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemExciseDuty))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemExciseDuty object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemExciseDuty object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemExciseDuty object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemExciseDuty, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDuty)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemExciseDuty) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemExciseDuty
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemExciseDuty)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemExciseDuty 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemExciseDuty object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemExciseDuty object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemExciseDuty, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDuty)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemExciseDuty) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemExciseDuty
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemExciseDutyAmount
|
|
|
|
Private quantityField As Decimal
|
|
|
|
Private measurementUnitField As String
|
|
|
|
Private qualifierField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Quantity() As Decimal
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me.measurementUnitField
|
|
End Get
|
|
Set
|
|
Me.measurementUnitField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me.qualifierField
|
|
End Get
|
|
Set
|
|
Me.qualifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemExciseDutyAmount))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemExciseDutyAmount object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemExciseDutyAmount object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemExciseDutyAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemExciseDutyAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDutyAmount)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemExciseDutyAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemExciseDutyAmount
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemExciseDutyAmount)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemExciseDutyAmount 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemExciseDutyAmount object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemExciseDutyAmount object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemExciseDutyAmount, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDutyAmount)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemExciseDutyAmount) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemExciseDutyAmount
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatment
|
|
|
|
Private requestedPreferentialTreatmentField As String
|
|
|
|
Private declarationField As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.declarationField = New FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration()
|
|
End Sub
|
|
|
|
Public Property RequestedPreferentialTreatment() As String
|
|
Get
|
|
Return Me.requestedPreferentialTreatmentField
|
|
End Get
|
|
Set
|
|
Me.requestedPreferentialTreatmentField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Declaration() As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
|
|
Get
|
|
Return Me.declarationField
|
|
End Get
|
|
Set
|
|
Me.declarationField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatment))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatment object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemPreferentialTreatment object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatment object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatment, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatment)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatment) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemPreferentialTreatment
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemPreferentialTreatment)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatment 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemPreferentialTreatment object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatment object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatment, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatment)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatment) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemPreferentialTreatment
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
|
|
|
|
Private contingentField As List(Of FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
|
|
|
|
Private preferentialTreatmentQuantityField As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.preferentialTreatmentQuantityField = New FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity()
|
|
Me.contingentField = New List(Of FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)()
|
|
End Sub
|
|
|
|
Public Property Contingent() As List(Of FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
|
|
Get
|
|
Return Me.contingentField
|
|
End Get
|
|
Set
|
|
Me.contingentField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property PreferentialTreatmentQuantity() As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
|
|
Get
|
|
Return Me.preferentialTreatmentQuantityField
|
|
End Get
|
|
Set
|
|
Me.preferentialTreatmentQuantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
|
|
|
|
Private contingentNumberField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property ContingentNumber() As String
|
|
Get
|
|
Return Me.contingentNumberField
|
|
End Get
|
|
Set
|
|
Me.contingentNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
|
|
|
|
Private quantityField As String
|
|
|
|
Private measurementUnitField As String
|
|
|
|
Private qualifierField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me.measurementUnitField
|
|
End Get
|
|
Set
|
|
Me.measurementUnitField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me.qualifierField
|
|
End Get
|
|
Set
|
|
Me.qualifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemSpecialCase
|
|
|
|
Private groupField As String
|
|
|
|
Private applicationTypeField As String
|
|
|
|
Private rateOrAmountOrFactorField As Decimal
|
|
|
|
Private rateOrAmountOrFactorFieldSpecified As Boolean
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Group() As String
|
|
Get
|
|
Return Me.groupField
|
|
End Get
|
|
Set
|
|
Me.groupField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ApplicationType() As String
|
|
Get
|
|
Return Me.applicationTypeField
|
|
End Get
|
|
Set
|
|
Me.applicationTypeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property RateOrAmountOrFactor() As Decimal
|
|
Get
|
|
Return Me.rateOrAmountOrFactorField
|
|
End Get
|
|
Set
|
|
Me.rateOrAmountOrFactorField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property RateOrAmountOrFactorSpecified() As Boolean
|
|
Get
|
|
Return Me.rateOrAmountOrFactorFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.rateOrAmountOrFactorFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemSpecialCase))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemSpecialCase object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemSpecialCase object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemSpecialCase object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemSpecialCase, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemSpecialCase)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemSpecialCase) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemSpecialCase
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemSpecialCase)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemSpecialCase 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemSpecialCase object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemSpecialCase object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemSpecialCase, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemSpecialCase)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemSpecialCase) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemSpecialCase
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemDocument
|
|
|
|
Private divisionField As String
|
|
|
|
Private typeField As String
|
|
|
|
Private referenceNumberField As String
|
|
|
|
Private issuingDateField As Date
|
|
|
|
Private issuingDateFieldSpecified As Boolean
|
|
|
|
Private atHandFlagField As String
|
|
|
|
Private writeOffField As FCFCDFBodyGoodsItemDocumentWriteOff
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me.writeOffField = New FCFCDFBodyGoodsItemDocumentWriteOff()
|
|
End Sub
|
|
|
|
Public Property Division() As String
|
|
Get
|
|
Return Me.divisionField
|
|
End Get
|
|
Set
|
|
Me.divisionField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me.typeField
|
|
End Get
|
|
Set
|
|
Me.typeField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me.referenceNumberField
|
|
End Get
|
|
Set
|
|
Me.referenceNumberField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property IssuingDate() As Date
|
|
Get
|
|
Return Me.issuingDateField
|
|
End Get
|
|
Set
|
|
Me.issuingDateField = Value
|
|
End Set
|
|
End Property
|
|
|
|
<System.Xml.Serialization.XmlIgnoreAttribute()>
|
|
Public Property IssuingDateSpecified() As Boolean
|
|
Get
|
|
Return Me.issuingDateFieldSpecified
|
|
End Get
|
|
Set
|
|
Me.issuingDateFieldSpecified = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property AtHandFlag() As String
|
|
Get
|
|
Return Me.atHandFlagField
|
|
End Get
|
|
Set
|
|
Me.atHandFlagField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property WriteOff() As FCFCDFBodyGoodsItemDocumentWriteOff
|
|
Get
|
|
Return Me.writeOffField
|
|
End Get
|
|
Set
|
|
Me.writeOffField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemDocument))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemDocument object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemDocument object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemDocument object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemDocument, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemDocument)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemDocument) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemDocument
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemDocument)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemDocument 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemDocument object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemDocument object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemDocument, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemDocument)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemDocument) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemDocument
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
|
|
Partial Public Class FCFCDFBodyGoodsItemDocumentWriteOff
|
|
|
|
Private quantityField As Decimal
|
|
|
|
Private measurementUnitField As String
|
|
|
|
Private qualifierField As String
|
|
|
|
Private Shared sSerializer As System.Xml.Serialization.XmlSerializer
|
|
|
|
Public Property Quantity() As Decimal
|
|
Get
|
|
Return Me.quantityField
|
|
End Get
|
|
Set
|
|
Me.quantityField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me.measurementUnitField
|
|
End Get
|
|
Set
|
|
Me.measurementUnitField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me.qualifierField
|
|
End Get
|
|
Set
|
|
Me.qualifierField = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property Serializer() As System.Xml.Serialization.XmlSerializer
|
|
Get
|
|
If (sSerializer Is Nothing) Then
|
|
sSerializer = New System.Xml.Serialization.XmlSerializer(GetType(FCFCDFBodyGoodsItemDocumentWriteOff))
|
|
End If
|
|
Return sSerializer
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemDocumentWriteOff object into an XML document
|
|
'''</summary>
|
|
'''<returns>string XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As System.IO.StreamReader = Nothing
|
|
Dim memoryStream As System.IO.MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New System.IO.MemoryStream()
|
|
Serializer.Serialize(memoryStream, Me)
|
|
memoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
|
streamReader = New System.IO.StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 workflow markup into an FCFCDFBodyGoodsItemDocumentWriteOff object
|
|
'''</summary>
|
|
'''<param name="xml">string workflow markup to deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemDocumentWriteOff object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemDocumentWriteOff, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemDocumentWriteOff)
|
|
Try
|
|
obj = Deserialize(xml)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String, ByRef obj As FCFCDFBodyGoodsItemDocumentWriteOff) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(xml, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal xml As String) As FCFCDFBodyGoodsItemDocumentWriteOff
|
|
Dim stringReader As System.IO.StringReader = Nothing
|
|
Try
|
|
stringReader = New System.IO.StringReader(xml)
|
|
Return CType(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)), FCFCDFBodyGoodsItemDocumentWriteOff)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
'''<summary>
|
|
'''Serializes current FCFCDFBodyGoodsItemDocumentWriteOff 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 System.IO.StreamWriter = Nothing
|
|
Try
|
|
Dim xmlString As String = Serialize()
|
|
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
|
|
streamWriter = xmlFile.CreateText
|
|
streamWriter.WriteLine(xmlString)
|
|
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 FCFCDFBodyGoodsItemDocumentWriteOff object
|
|
'''</summary>
|
|
'''<param name="fileName">string xml file to load and deserialize</param>
|
|
'''<param name="obj">Output FCFCDFBodyGoodsItemDocumentWriteOff object</param>
|
|
'''<param name="exception">output Exception value if deserialize failed</param>
|
|
'''<returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemDocumentWriteOff, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FCFCDFBodyGoodsItemDocumentWriteOff)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemDocumentWriteOff) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FCFCDFBodyGoodsItemDocumentWriteOff
|
|
Dim file As System.IO.FileStream = Nothing
|
|
Dim sr As System.IO.StreamReader = Nothing
|
|
Try
|
|
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New System.IO.StreamReader(file)
|
|
Dim xmlString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(xmlString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
#End Region
|
|
End Class
|
|
End Namespace
|