einfach alles

This commit is contained in:
Jonathan Jenne
2023-12-05 15:40:16 +01:00
parent 763ac96f4e
commit 6f91ecac83
14 changed files with 522 additions and 247 deletions

View File

@@ -1,4 +1,5 @@
Imports System.Data.SqlClient
Imports DigitalData.Modules.Base
Public Class HistoryModel
Inherits BaseModel
@@ -7,6 +8,24 @@ Public Class HistoryModel
MyBase.New(pState)
End Sub
Private Function ToEnvelopeHistoryEntry(pRow As DataRow) As EnvelopeHistoryEntry
Return New EnvelopeHistoryEntry() With {
.ActionDate = pRow.Item("ACTION_DATE"),
.EnvelopeId = pRow.Item("ENVELOPE_ID"),
.Status = pRow.Item("STATUS"),
.UserReference = pRow.ItemEx("USER_REFERENCE", "")
}
End Function
Public Function List(pEnvelopeId As Integer) As List(Of EnvelopeHistoryEntry)
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE_HISTORY WHERE ENVELOPE_ID = {pEnvelopeId} AND STATUS < 3000 ORDER BY ADDED_WHEN DESC"
Dim oTable = Database.GetDatatable(oSql)
Return oTable?.Rows.
Cast(Of DataRow).
Select(AddressOf ToEnvelopeHistoryEntry).
ToList()
End Function
Public Function Insert(pHistory As EnvelopeHistoryEntry) As Boolean
Try
Dim oSql = "INSERT INTO [dbo].[TBSIG_ENVELOPE_HISTORY] "