1526 lines
60 KiB
VB.net
1526 lines
60 KiB
VB.net
'' ------------------------------------------------------------------------------
|
|
'' <auto-generated>
|
|
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
|
|
'' {"TargetFramework":"Net47","NameSpace":"QuittungEingangsverarbeitung_005","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"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 QuittungEingangsverarbeitung_005
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlRoot("QuittungEingangsverarbeitung", [Namespace]:="", IsNullable:=False)>
|
|
Partial Public Class QuittungEingangsverarbeitungBQTyp
|
|
Inherits DatenaustauschAllgemeinTyp
|
|
|
|
#Region "Private fields"
|
|
Private _einzelQuittung As List(Of EinzelQuittungTyp)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._einzelQuittung = New List(Of EinzelQuittungTyp)()
|
|
End Sub
|
|
|
|
<XmlElement("EinzelQuittung", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property EinzelQuittung() As List(Of EinzelQuittungTyp)
|
|
Get
|
|
Return Me._einzelQuittung
|
|
End Get
|
|
Set
|
|
Me._einzelQuittung = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(QuittungEingangsverarbeitungBQTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize QuittungEingangsverarbeitungBQTyp 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()
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 QuittungEingangsverarbeitungBQTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output QuittungEingangsverarbeitungBQTyp object</param>
|
|
''' <param name="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 QuittungEingangsverarbeitungBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungEingangsverarbeitungBQTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As QuittungEingangsverarbeitungBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As QuittungEingangsverarbeitungBQTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), QuittungEingangsverarbeitungBQTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As QuittungEingangsverarbeitungBQTyp
|
|
Return CType(SerializerXml.Deserialize(s), QuittungEingangsverarbeitungBQTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current QuittungEingangsverarbeitungBQTyp 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 QuittungEingangsverarbeitungBQTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output QuittungEingangsverarbeitungBQTyp object</param>
|
|
''' <param name="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 QuittungEingangsverarbeitungBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungEingangsverarbeitungBQTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As QuittungEingangsverarbeitungBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As QuittungEingangsverarbeitungBQTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class EinzelQuittungTyp
|
|
|
|
#Region "Private fields"
|
|
Private _transaktionsreferenz As String
|
|
|
|
Private _quittungsobjekt As QuittungsObjektBQTyp
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._quittungsobjekt = New QuittungsObjektBQTyp()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Transaktionsreferenz() As String
|
|
Get
|
|
Return Me._transaktionsreferenz
|
|
End Get
|
|
Set
|
|
Me._transaktionsreferenz = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Quittungsobjekt() As QuittungsObjektBQTyp
|
|
Get
|
|
Return Me._quittungsobjekt
|
|
End Get
|
|
Set
|
|
Me._quittungsobjekt = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelQuittungTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize EinzelQuittungTyp 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()
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 EinzelQuittungTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output EinzelQuittungTyp object</param>
|
|
''' <param name="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 EinzelQuittungTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, EinzelQuittungTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelQuittungTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelQuittungTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelQuittungTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelQuittungTyp
|
|
Return CType(SerializerXml.Deserialize(s), EinzelQuittungTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current EinzelQuittungTyp 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 EinzelQuittungTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output EinzelQuittungTyp object</param>
|
|
''' <param name="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 EinzelQuittungTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, EinzelQuittungTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelQuittungTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelQuittungTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class QuittungsObjektBQTyp
|
|
|
|
#Region "Private fields"
|
|
Private _quittungTech As List(Of QuittungTechBQTyp)
|
|
|
|
Private _abbruchGrund As String
|
|
|
|
Private _fehlerValidierung As List(Of String)
|
|
|
|
Private _quittungFach As List(Of QuittungFachBQTyp)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._quittungFach = New List(Of QuittungFachBQTyp)()
|
|
Me._fehlerValidierung = New List(Of String)()
|
|
Me._quittungTech = New List(Of QuittungTechBQTyp)()
|
|
End Sub
|
|
|
|
<XmlElement("QuittungTech", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property QuittungTech() As List(Of QuittungTechBQTyp)
|
|
Get
|
|
Return Me._quittungTech
|
|
End Get
|
|
Set
|
|
Me._quittungTech = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AbbruchGrund() As String
|
|
Get
|
|
Return Me._abbruchGrund
|
|
End Get
|
|
Set
|
|
Me._abbruchGrund = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("FehlerValidierung", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property FehlerValidierung() As List(Of String)
|
|
Get
|
|
Return Me._fehlerValidierung
|
|
End Get
|
|
Set
|
|
Me._fehlerValidierung = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("QuittungFach", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property QuittungFach() As List(Of QuittungFachBQTyp)
|
|
Get
|
|
Return Me._quittungFach
|
|
End Get
|
|
Set
|
|
Me._quittungFach = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(QuittungsObjektBQTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize QuittungsObjektBQTyp 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()
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 QuittungsObjektBQTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output QuittungsObjektBQTyp object</param>
|
|
''' <param name="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 QuittungsObjektBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungsObjektBQTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As QuittungsObjektBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As QuittungsObjektBQTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), QuittungsObjektBQTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As QuittungsObjektBQTyp
|
|
Return CType(SerializerXml.Deserialize(s), QuittungsObjektBQTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current QuittungsObjektBQTyp 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 QuittungsObjektBQTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output QuittungsObjektBQTyp object</param>
|
|
''' <param name="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 QuittungsObjektBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungsObjektBQTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As QuittungsObjektBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As QuittungsObjektBQTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class QuittungTechBQTyp
|
|
|
|
#Region "Private fields"
|
|
Private _objektWdhTech As String
|
|
|
|
Private _bezugsObjekt As String
|
|
|
|
Private _ergebnisTech As String
|
|
|
|
Private _fehlerTech As List(Of String)
|
|
|
|
Private _korrekturen As List(Of String)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._korrekturen = New List(Of String)()
|
|
Me._fehlerTech = New List(Of String)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="nonNegativeInteger")>
|
|
Public Property ObjektWdhTech() As String
|
|
Get
|
|
Return Me._objektWdhTech
|
|
End Get
|
|
Set
|
|
Me._objektWdhTech = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property BezugsObjekt() As String
|
|
Get
|
|
Return Me._bezugsObjekt
|
|
End Get
|
|
Set
|
|
Me._bezugsObjekt = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ErgebnisTech() As String
|
|
Get
|
|
Return Me._ergebnisTech
|
|
End Get
|
|
Set
|
|
Me._ergebnisTech = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("FehlerTech", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property FehlerTech() As List(Of String)
|
|
Get
|
|
Return Me._fehlerTech
|
|
End Get
|
|
Set
|
|
Me._fehlerTech = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("Korrekturen", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Korrekturen() As List(Of String)
|
|
Get
|
|
Return Me._korrekturen
|
|
End Get
|
|
Set
|
|
Me._korrekturen = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(QuittungTechBQTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize QuittungTechBQTyp 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()
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 QuittungTechBQTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output QuittungTechBQTyp object</param>
|
|
''' <param name="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 QuittungTechBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungTechBQTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As QuittungTechBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As QuittungTechBQTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), QuittungTechBQTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As QuittungTechBQTyp
|
|
Return CType(SerializerXml.Deserialize(s), QuittungTechBQTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current QuittungTechBQTyp 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 QuittungTechBQTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output QuittungTechBQTyp object</param>
|
|
''' <param name="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 QuittungTechBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungTechBQTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As QuittungTechBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As QuittungTechBQTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class QuittungFachBQTyp
|
|
|
|
#Region "Private fields"
|
|
Private _objektWdhFach As String
|
|
|
|
Private _bezugsObjektFach As String
|
|
|
|
Private _gesamtErgebnis As String
|
|
|
|
Private _ergebnisGrund As String
|
|
|
|
Private _aktionErfolg As List(Of String)
|
|
|
|
Private _aktionNdf As List(Of String)
|
|
|
|
Private _fehlerAnwendung As List(Of String)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._fehlerAnwendung = New List(Of String)()
|
|
Me._aktionNdf = New List(Of String)()
|
|
Me._aktionErfolg = New List(Of String)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="nonNegativeInteger")>
|
|
Public Property ObjektWdhFach() As String
|
|
Get
|
|
Return Me._objektWdhFach
|
|
End Get
|
|
Set
|
|
Me._objektWdhFach = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property BezugsObjektFach() As String
|
|
Get
|
|
Return Me._bezugsObjektFach
|
|
End Get
|
|
Set
|
|
Me._bezugsObjektFach = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GesamtErgebnis() As String
|
|
Get
|
|
Return Me._gesamtErgebnis
|
|
End Get
|
|
Set
|
|
Me._gesamtErgebnis = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ErgebnisGrund() As String
|
|
Get
|
|
Return Me._ergebnisGrund
|
|
End Get
|
|
Set
|
|
Me._ergebnisGrund = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AktionErfolg", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AktionErfolg() As List(Of String)
|
|
Get
|
|
Return Me._aktionErfolg
|
|
End Get
|
|
Set
|
|
Me._aktionErfolg = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AktionNdf", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AktionNdf() As List(Of String)
|
|
Get
|
|
Return Me._aktionNdf
|
|
End Get
|
|
Set
|
|
Me._aktionNdf = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("FehlerAnwendung", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property FehlerAnwendung() As List(Of String)
|
|
Get
|
|
Return Me._fehlerAnwendung
|
|
End Get
|
|
Set
|
|
Me._fehlerAnwendung = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(QuittungFachBQTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize QuittungFachBQTyp 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()
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 QuittungFachBQTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output QuittungFachBQTyp object</param>
|
|
''' <param name="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 QuittungFachBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungFachBQTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As QuittungFachBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As QuittungFachBQTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), QuittungFachBQTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As QuittungFachBQTyp
|
|
Return CType(SerializerXml.Deserialize(s), QuittungFachBQTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current QuittungFachBQTyp 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 QuittungFachBQTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output QuittungFachBQTyp object</param>
|
|
''' <param name="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 QuittungFachBQTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, QuittungFachBQTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As QuittungFachBQTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As QuittungFachBQTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class TransaktionAllgemeinTyp
|
|
|
|
#Region "Private fields"
|
|
Private _iOPartner As String
|
|
|
|
Private _iODivision1 As String
|
|
|
|
Private _iODivision2 As String
|
|
|
|
Private _iODivision3 As String
|
|
|
|
Private _iOReferenz As String
|
|
|
|
Private _iODatumZeit As Date
|
|
|
|
Private _version As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IOPartner() As String
|
|
Get
|
|
Return Me._iOPartner
|
|
End Get
|
|
Set
|
|
Me._iOPartner = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODivision1() As String
|
|
Get
|
|
Return Me._iODivision1
|
|
End Get
|
|
Set
|
|
Me._iODivision1 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODivision2() As String
|
|
Get
|
|
Return Me._iODivision2
|
|
End Get
|
|
Set
|
|
Me._iODivision2 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODivision3() As String
|
|
Get
|
|
Return Me._iODivision3
|
|
End Get
|
|
Set
|
|
Me._iODivision3 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IOReferenz() As String
|
|
Get
|
|
Return Me._iOReferenz
|
|
End Get
|
|
Set
|
|
Me._iOReferenz = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODatumZeit() As Date
|
|
Get
|
|
Return Me._iODatumZeit
|
|
End Get
|
|
Set
|
|
Me._iODatumZeit = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="nonNegativeInteger")>
|
|
Public Property Version() As String
|
|
Get
|
|
Return Me._version
|
|
End Get
|
|
Set
|
|
Me._version = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionAllgemeinTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize TransaktionAllgemeinTyp 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()
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 TransaktionAllgemeinTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output TransaktionAllgemeinTyp object</param>
|
|
''' <param name="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 TransaktionAllgemeinTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransaktionAllgemeinTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionAllgemeinTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionAllgemeinTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionAllgemeinTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionAllgemeinTyp
|
|
Return CType(SerializerXml.Deserialize(s), TransaktionAllgemeinTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current TransaktionAllgemeinTyp 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 TransaktionAllgemeinTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output TransaktionAllgemeinTyp object</param>
|
|
''' <param name="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 TransaktionAllgemeinTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransaktionAllgemeinTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionAllgemeinTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionAllgemeinTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<XmlIncludeAttribute(GetType(QuittungEingangsverarbeitungBQTyp)),
|
|
System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class DatenaustauschAllgemeinTyp
|
|
|
|
#Region "Private fields"
|
|
Private _transaktion As TransaktionAllgemeinTyp
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._transaktion = New TransaktionAllgemeinTyp()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Transaktion() As TransaktionAllgemeinTyp
|
|
Get
|
|
Return Me._transaktion
|
|
End Get
|
|
Set
|
|
Me._transaktion = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschAllgemeinTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize DatenaustauschAllgemeinTyp 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()
|
|
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
|
|
SerializerXml.Serialize(xmlWriter, Me)
|
|
memoryStream.Seek(0, SeekOrigin.Begin)
|
|
streamReader = New StreamReader(memoryStream)
|
|
Return streamReader.ReadToEnd
|
|
Finally
|
|
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 DatenaustauschAllgemeinTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DatenaustauschAllgemeinTyp object</param>
|
|
''' <param name="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 DatenaustauschAllgemeinTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DatenaustauschAllgemeinTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschAllgemeinTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschAllgemeinTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschAllgemeinTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschAllgemeinTyp
|
|
Return CType(SerializerXml.Deserialize(s), DatenaustauschAllgemeinTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current DatenaustauschAllgemeinTyp 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 DatenaustauschAllgemeinTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DatenaustauschAllgemeinTyp object</param>
|
|
''' <param name="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 DatenaustauschAllgemeinTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DatenaustauschAllgemeinTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschAllgemeinTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschAllgemeinTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
End Namespace
|
|
#Enable Warning
|