885 lines
30 KiB
VB.net
885 lines
30 KiB
VB.net
'' ------------------------------------------------------------------------------
|
|
'' <auto-generated>
|
|
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
|
|
'' {"TargetFramework":"Net48","NameSpace":"CC316A_v10_0","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
|
|
'' </auto-generated>
|
|
'' ------------------------------------------------------------------------------
|
|
#Disable Warning
|
|
Imports System
|
|
Imports System.Diagnostics
|
|
Imports System.Xml.Serialization
|
|
Imports System.Runtime.Serialization
|
|
Imports System.Collections
|
|
Imports System.Xml.Schema
|
|
Imports System.ComponentModel
|
|
Imports System.Xml
|
|
Imports System.IO
|
|
Imports System.Text
|
|
Imports System.Collections.Generic
|
|
|
|
Namespace CC316A_v10_0
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType([Namespace]:="http://ics.dgtaxud.ec/CC316A"),
|
|
XmlRoot("CC316A", [Namespace]:="http://ics.dgtaxud.ec/CC316A", IsNullable:=False)>
|
|
Partial Public Class CC316AType
|
|
|
|
#Region "Private fields"
|
|
Private _mesSenMES3 As String
|
|
|
|
Private _mesRecMES6 As String
|
|
|
|
Private _datOfPreMES9 As String
|
|
|
|
Private _timOfPreMES10 As String
|
|
|
|
Private _priMES15 As String
|
|
|
|
Private _tesIndMES18 As Flag
|
|
|
|
Private _mesIdeMES19 As String
|
|
|
|
Private _mesTypMES20 As MessageTypes
|
|
|
|
Private _corIdeMES25 As String
|
|
|
|
Private _hEAHEA As HEAHEAType
|
|
|
|
Private _fUNERRER1 As List(Of FUNERRER1Type)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._fUNERRER1 = New List(Of FUNERRER1Type)()
|
|
Me._hEAHEA = New HEAHEAType()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property MesSenMES3() As String
|
|
Get
|
|
Return Me._mesSenMES3
|
|
End Get
|
|
Set
|
|
Me._mesSenMES3 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property MesRecMES6() As String
|
|
Get
|
|
Return Me._mesRecMES6
|
|
End Get
|
|
Set
|
|
Me._mesRecMES6 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property DatOfPreMES9() As String
|
|
Get
|
|
Return Me._datOfPreMES9
|
|
End Get
|
|
Set
|
|
Me._datOfPreMES9 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property TimOfPreMES10() As String
|
|
Get
|
|
Return Me._timOfPreMES10
|
|
End Get
|
|
Set
|
|
Me._timOfPreMES10 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property PriMES15() As String
|
|
Get
|
|
Return Me._priMES15
|
|
End Get
|
|
Set
|
|
Me._priMES15 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TesIndMES18() As Flag
|
|
Get
|
|
Return Me._tesIndMES18
|
|
End Get
|
|
Set
|
|
Me._tesIndMES18 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property MesIdeMES19() As String
|
|
Get
|
|
Return Me._mesIdeMES19
|
|
End Get
|
|
Set
|
|
Me._mesIdeMES19 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property MesTypMES20() As MessageTypes
|
|
Get
|
|
Return Me._mesTypMES20
|
|
End Get
|
|
Set
|
|
Me._mesTypMES20 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property CorIdeMES25() As String
|
|
Get
|
|
Return Me._corIdeMES25
|
|
End Get
|
|
Set
|
|
Me._corIdeMES25 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property HEAHEA() As HEAHEAType
|
|
Get
|
|
Return Me._hEAHEA
|
|
End Get
|
|
Set
|
|
Me._hEAHEA = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("FUNERRER1", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property FUNERRER1() As List(Of FUNERRER1Type)
|
|
Get
|
|
Return Me._fUNERRER1
|
|
End Get
|
|
Set
|
|
Me._fUNERRER1 = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CC316AType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize CC316AType object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As StreamReader = Nothing
|
|
Dim memoryStream As MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New MemoryStream()
|
|
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
|
|
xmlWriterSettings.Indent = True
|
|
xmlWriterSettings.IndentChars = " "
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
If (Not (streamReader) Is Nothing) Then
|
|
streamReader.Dispose()
|
|
End If
|
|
If (Not (memoryStream) Is Nothing) Then
|
|
memoryStream.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
''' <summary>
|
|
''' Deserializes CC316AType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output CC316AType object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CC316AType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CC316AType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CC316AType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As CC316AType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CC316AType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As CC316AType
|
|
Return CType(SerializerXml.Deserialize(s), CC316AType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current CC316AType object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an CC316AType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output CC316AType object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC316AType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CC316AType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC316AType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CC316AType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
|
|
Public Enum Flag
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
|
|
Public Enum MessageTypes
|
|
|
|
CC304A
|
|
|
|
CC305A
|
|
|
|
CC313A
|
|
|
|
CC315A
|
|
|
|
CC316A
|
|
|
|
CC323A
|
|
|
|
CC324A
|
|
|
|
CC325A
|
|
|
|
CC328A
|
|
|
|
CC351A
|
|
|
|
CD030C
|
|
|
|
CD031C
|
|
|
|
CD032C
|
|
|
|
CD070B
|
|
|
|
CD071B
|
|
|
|
CD301A
|
|
|
|
CD302A
|
|
|
|
CD303A
|
|
|
|
CD319A
|
|
|
|
CD411C
|
|
|
|
CD412C
|
|
|
|
CD906B
|
|
|
|
CD912B
|
|
|
|
CD913B
|
|
|
|
CD914B
|
|
|
|
CD916B
|
|
|
|
CD917B
|
|
|
|
CD931C
|
|
|
|
CD932C
|
|
|
|
CD971B
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType([Namespace]:="http://ics.dgtaxud.ec/CC316A")>
|
|
Partial Public Class HEAHEAType
|
|
|
|
#Region "Private fields"
|
|
Private _refNumHEA4 As String
|
|
|
|
Private _decRejReaHEA252 As String
|
|
|
|
Private _decRejReaHEA252LNG As String
|
|
|
|
Private _decRejDatTimHEA116 As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property RefNumHEA4() As String
|
|
Get
|
|
Return Me._refNumHEA4
|
|
End Get
|
|
Set
|
|
Me._refNumHEA4 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property DecRejReaHEA252() As String
|
|
Get
|
|
Return Me._decRejReaHEA252
|
|
End Get
|
|
Set
|
|
Me._decRejReaHEA252 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property DecRejReaHEA252LNG() As String
|
|
Get
|
|
Return Me._decRejReaHEA252LNG
|
|
End Get
|
|
Set
|
|
Me._decRejReaHEA252LNG = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property DecRejDatTimHEA116() As String
|
|
Get
|
|
Return Me._decRejDatTimHEA116
|
|
End Get
|
|
Set
|
|
Me._decRejDatTimHEA116 = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HEAHEAType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize HEAHEAType object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As StreamReader = Nothing
|
|
Dim memoryStream As MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New MemoryStream()
|
|
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
|
|
xmlWriterSettings.Indent = True
|
|
xmlWriterSettings.IndentChars = " "
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
If (Not (streamReader) Is Nothing) Then
|
|
streamReader.Dispose()
|
|
End If
|
|
If (Not (memoryStream) Is Nothing) Then
|
|
memoryStream.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
''' <summary>
|
|
''' Deserializes HEAHEAType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output HEAHEAType object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HEAHEAType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, HEAHEAType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HEAHEAType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As HEAHEAType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HEAHEAType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As HEAHEAType
|
|
Return CType(SerializerXml.Deserialize(s), HEAHEAType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current HEAHEAType object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an HEAHEAType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output HEAHEAType object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HEAHEAType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, HEAHEAType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HEAHEAType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HEAHEAType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType([Namespace]:="http://ics.dgtaxud.ec/CC316A")>
|
|
Partial Public Class FUNERRER1Type
|
|
|
|
#Region "Private fields"
|
|
Private _errTypER11 As FunctionalErrorCodes
|
|
|
|
Private _errPoiER12 As String
|
|
|
|
Private _errReaER13 As String
|
|
|
|
Private _oriAttValER14 As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ErrTypER11() As FunctionalErrorCodes
|
|
Get
|
|
Return Me._errTypER11
|
|
End Get
|
|
Set
|
|
Me._errTypER11 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property ErrPoiER12() As String
|
|
Get
|
|
Return Me._errPoiER12
|
|
End Get
|
|
Set
|
|
Me._errPoiER12 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property ErrReaER13() As String
|
|
Get
|
|
Return Me._errReaER13
|
|
End Get
|
|
Set
|
|
Me._errReaER13 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
|
|
Public Property OriAttValER14() As String
|
|
Get
|
|
Return Me._oriAttValER14
|
|
End Get
|
|
Set
|
|
Me._oriAttValER14 = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FUNERRER1Type))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize FUNERRER1Type object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
Dim streamReader As StreamReader = Nothing
|
|
Dim memoryStream As MemoryStream = Nothing
|
|
Try
|
|
memoryStream = New MemoryStream()
|
|
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
|
|
xmlWriterSettings.Indent = True
|
|
xmlWriterSettings.IndentChars = " "
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
If (Not (streamReader) Is Nothing) Then
|
|
streamReader.Dispose()
|
|
End If
|
|
If (Not (memoryStream) Is Nothing) Then
|
|
memoryStream.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
''' <summary>
|
|
''' Deserializes FUNERRER1Type object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output FUNERRER1Type object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FUNERRER1Type, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FUNERRER1Type)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FUNERRER1Type) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As FUNERRER1Type
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FUNERRER1Type)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As FUNERRER1Type
|
|
Return CType(SerializerXml.Deserialize(s), FUNERRER1Type)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current FUNERRER1Type object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an FUNERRER1Type object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output FUNERRER1Type object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FUNERRER1Type, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, FUNERRER1Type)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FUNERRER1Type) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FUNERRER1Type
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
|
|
Public Enum FunctionalErrorCodes
|
|
|
|
<XmlEnum("12")>
|
|
Item12
|
|
|
|
<XmlEnum("13")>
|
|
Item13
|
|
|
|
<XmlEnum("14")>
|
|
Item14
|
|
|
|
<XmlEnum("15")>
|
|
Item15
|
|
|
|
<XmlEnum("19")>
|
|
Item19
|
|
|
|
<XmlEnum("26")>
|
|
Item26
|
|
|
|
<XmlEnum("35")>
|
|
Item35
|
|
|
|
<XmlEnum("37")>
|
|
Item37
|
|
|
|
<XmlEnum("38")>
|
|
Item38
|
|
|
|
<XmlEnum("39")>
|
|
Item39
|
|
|
|
<XmlEnum("40")>
|
|
Item40
|
|
|
|
<XmlEnum("90")>
|
|
Item90
|
|
|
|
<XmlEnum("91")>
|
|
Item91
|
|
|
|
<XmlEnum("92")>
|
|
Item92
|
|
|
|
<XmlEnum("93")>
|
|
Item93
|
|
End Enum
|
|
End Namespace
|
|
#Enable Warning
|