29-11-2023
This commit is contained in:
32
EnvelopeGenerator.Common/Services/HistoryService.vb
Normal file
32
EnvelopeGenerator.Common/Services/HistoryService.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
|
||||
Public Class HistoryService
|
||||
Inherits BaseClass
|
||||
|
||||
Private ReadOnly State As State
|
||||
|
||||
Private ReadOnly EnvelopeModel As EnvelopeModel
|
||||
Private ReadOnly ReceiverModel As ReceiverModel
|
||||
Private ReadOnly HistoryModel As HistoryModel
|
||||
|
||||
Public Sub New(pState As State)
|
||||
MyBase.New(pState.LogConfig)
|
||||
|
||||
State = pState
|
||||
EnvelopeModel = New EnvelopeModel(pState)
|
||||
ReceiverModel = New ReceiverModel(pState)
|
||||
HistoryModel = New HistoryModel(pState)
|
||||
End Sub
|
||||
|
||||
Public Function SetEnvelopeStatus(pEnvelope As Envelope, pStatus As EnvelopeStatus, pUserReference As String) As Boolean
|
||||
Return HistoryModel.Insert(New EnvelopeHistoryEntry() With {
|
||||
.EnvelopeId = pEnvelope.Id,
|
||||
.ActionDate = Now(),
|
||||
.Status = pStatus,
|
||||
.UserReference = pUserReference
|
||||
})
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user