2023-08-07

This commit is contained in:
Jonathan Jenne
2023-08-07 11:23:52 +02:00
parent c8b2f21fea
commit 462bf4a61f
53 changed files with 1415 additions and 33 deletions

View File

@@ -0,0 +1,33 @@
Imports System.Data
Imports DigitalData.Modules.Base
Public Class DocumentModel
Inherits BaseModel
Public Sub New(pState As State)
MyBase.New(pState)
End Sub
Private Function ToDocument(pRow As DataRow) As EnvelopeDocument
Return New EnvelopeDocument() With {
.Id = pRow.ItemEx("GUID", 0),
.EnvelopeId = pRow.ItemEx("ENVELOPE_ID", 0),
.FileInfo = New IO.FileInfo(pRow.ItemEx("FILEPATH", "")),
.IsTempFile = False
}
End Function
Public Function List(pEnvelopeId As Integer) As IEnumerable(Of EnvelopeDocument)
Try
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_ENVELOPE_DOCUMENT] WHERE ENVELOPE_ID = {pEnvelopeId}"
Dim oTable = Database.GetDatatable(oSql)
Return oTable?.Rows.Cast(Of DataRow).
Select(AddressOf ToDocument).
ToList()
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
End Class