Jonathan Jenne 8dfc659ef8 WIP
2021-10-21 16:19:35 +02:00

66 lines
2.0 KiB
VB.net

Imports System.IO
Namespace Documents
Public Class Document
Public File As FileInfo
Public Mandator As String
Public Type As DocumentType
Public Selected As Boolean = False
''' <summary>
''' TODO: Set before submitting to web services
''' </summary>
Public CreatedAt As Date
Public TemplateName As String
Public TemplateType As Integer
Public [Option] As Integer
Public PrintVoucher As Integer
''' <summary>
''' Original Values, read-only
''' </summary>
Public Property Rows As New List(Of DocumentRow)
Public ReadOnly Property FullName As String
Get
Return File?.FullName
End Get
End Property
Public ReadOnly Property Name As String
Get
Return File?.Name
End Get
End Property
Public Overrides Function Equals(obj As Object) As Boolean
Return FullName = DirectCast(obj, Document).FullName
End Function
' Public Type As DocumentType
' Public Data As Object
' Public DataOriginal As Object
' Public DataOutput As Object
' Public DataString As String
' Public Selected As Boolean = False
' Public Shared Function GetDocumentTypeFromTemplateName(pTemplateName As String) As DocumentType
' Return DocumentMatch.TypeMatchingTable.
' Where(Function(kv) pTemplateName.Contains(kv.Key)).
' Select(Function(kv) kv.Value).
' FirstOrDefault()
' End Function
' Public Shared Function GetDocumentSchemaFromDocumentType(pDocumentType As DocumentType) As Type
' Return DocumentMatch.SchemaMatchingTable.
' Where(Function(kv) pDocumentType = kv.Key).
' Select(Function(kv) kv.Value).
' FirstOrDefault()
' End Function
End Class
End Namespace