29-11-2023
This commit is contained in:
32
EnvelopeGenerator.Common/Services/ActionService.vb
Normal file
32
EnvelopeGenerator.Common/Services/ActionService.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
|
||||
Public Class ActionService
|
||||
Inherits BaseClass
|
||||
|
||||
Private ReadOnly State As State
|
||||
|
||||
Private EmailService As EmailService
|
||||
Private HistoryService As HistoryService
|
||||
|
||||
|
||||
Public Sub New(pState As State)
|
||||
MyBase.New(pState.LogConfig)
|
||||
|
||||
State = pState
|
||||
EmailService = New EmailService(pState)
|
||||
HistoryService = New HistoryService(pState)
|
||||
End Sub
|
||||
|
||||
Public Function DeleteEnvelope(pEnvelope As Envelope) As Boolean
|
||||
|
||||
HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeDeleted, pEnvelope.User.Email)
|
||||
|
||||
For Each oReceiver As EnvelopeReceiver In pEnvelope.Receivers
|
||||
EmailService.SendEnvelopeDeletedEmail(oReceiver.Id, pEnvelope.Id)
|
||||
Next
|
||||
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user