receiver history

This commit is contained in:
Jonathan Jenne
2023-12-06 12:40:24 +01:00
parent 078b1d30fe
commit 25f7aeb45c
5 changed files with 80 additions and 29 deletions

View File

@@ -219,34 +219,10 @@ Public Class EnvelopeEditorController
End Try
End Function
Private Function GetEnvelopePath(pEnvelope As Envelope) As String
Try
Dim oEnvelopePath As String = Path.Combine(State.DbConfig.DocumentPath, pEnvelope.Uuid)
If Not Directory.Exists(oEnvelopePath) Then
Directory.CreateDirectory(oEnvelopePath)
End If
Return oEnvelopePath
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
#End Region
Private Function SaveEnvelopeDocuments(pEnvelope As Envelope, pTransaction As SqlTransaction) As Boolean
Try
Return pEnvelope.Documents.
Where(Function(d) d.Id = 0).
Select(Function(d) DocumentModel.Insert(pEnvelope, d, pTransaction)).
All(Function(pResult) pResult = True)
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
Public Function GetEnvelopeReceiverAddresses(pUserId As Integer) As List(Of String)
Return ReceiverModel.ListAllEnvelopeReceiverAddresses(pUserId)
End Function
Public Function CreateNewReceivers(pNewReceivers As List(Of EnvelopeReceiver)) As Boolean
@@ -273,6 +249,36 @@ Public Class EnvelopeEditorController
End Try
End Function
#End Region
Private Function GetEnvelopePath(pEnvelope As Envelope) As String
Try
Dim oEnvelopePath As String = Path.Combine(State.DbConfig.DocumentPath, pEnvelope.Uuid)
If Not Directory.Exists(oEnvelopePath) Then
Directory.CreateDirectory(oEnvelopePath)
End If
Return oEnvelopePath
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
Private Function SaveEnvelopeDocuments(pEnvelope As Envelope, pTransaction As SqlTransaction) As Boolean
Try
Return pEnvelope.Documents.
Where(Function(d) d.Id = 0).
Select(Function(d) DocumentModel.Insert(pEnvelope, d, pTransaction)).
All(Function(pResult) pResult = True)
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Private Function SaveEnvelopeReceivers(pEnvelope As Envelope, pTransaction As SqlTransaction) As Boolean
Try