This commit is contained in:
PitzM 2023-10-11 09:38:06 +02:00
parent df3e01b921
commit 603ee5a1fc
2 changed files with 9 additions and 10 deletions

View File

@ -19,7 +19,7 @@ Public Class HistoryModel
oSql += " (@ENVELOPE_ID "
oSql += " ,@USER_REFERENCE "
oSql += " ,@ACTION_TYPE "
oSql += " ,@ACTION_DESCRIPTION) "
oSql += " ,@ACTION_DESCRIPTION "
oSql += " ,@ACTION_DATE) "
Dim oCommand As New SqlCommand(oSql)
@ -27,7 +27,7 @@ Public Class HistoryModel
oCommand.Parameters.Add("USER_REFERENCE", SqlDbType.NVarChar).Value = pHistory.UserReference
oCommand.Parameters.Add("ACTION_TYPE", SqlDbType.NVarChar).Value = pHistory
oCommand.Parameters.Add("ACTION_DESCRIPTION", SqlDbType.NVarChar).Value = pHistory.ActionDescription
oCommand.Parameters.Add("ACTION_DATE", SqlDbType.DateTime).Value = pHistory
oCommand.Parameters.Add("ACTION_DATE", SqlDbType.DateTime).Value = Now()
If Database.ExecuteNonQuery(oCommand) Then
Return True

View File

@ -31,11 +31,9 @@ Public Class EnvelopeEditorController
#Region "Public"
Public Function SendEnvelope() As Boolean
Dim oResult As Boolean = True
For Each receiverItem As EnvelopeReceiver In Envelope.Receivers
Dim oEmailData As EmailData = New EmailData With
Dim oEmailData As New EmailData With
{
.EmailAdress = receiverItem.Email,
.EmailSubject = Envelope.Subject,
@ -48,12 +46,12 @@ Public Class EnvelopeEditorController
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, Envelope.Uuid, receiverItem.Signature)
}
Dim oTemplate As EmailTemplate = New EmailTemplate(State)
Dim oTemplate As New EmailTemplate(State)
oTemplate.FillEmailBody(oEmailData)
If EmailModel.Insert(oEmailData) = False Then
Logger.Error("EMail data could not be inserted.")
oResult = False
Dim oResult As Boolean = False
End If
Next
@ -97,12 +95,13 @@ Public Class EnvelopeEditorController
Dim newHistoryEntry As New EnvelopeHistoryEntry With {
.EnvelopeId = oEnvelope.Id,
.Status = HistoryStatus.Created,
.ActionTitle = "Envelope erstellt",
.ActionType = ActionType.Created,
.ActionDescription = "Envelope wurde neu erstellt",
.UserEmailAddress = oEnvelope.User.Email
}
HistoryModel.Insert(newHistoryEntry)
Return oEnvelope
Else
Return Nothing
@ -159,7 +158,7 @@ Public Class EnvelopeEditorController
Public Function CreateDocument(pDocumentFilePath As String) As EnvelopeDocument
Try
Dim oFileInfo = New FileInfo(pDocumentFilePath)
Dim oTempFiles As TempFiles = New TempFiles(State.LogConfig)
Dim oTempFiles As New TempFiles(State.LogConfig)
Dim oTempFilePath = Path.Combine(oTempFiles.TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
File.Copy(oFileInfo.FullName, oTempFilePath, True)