Merge
This commit is contained in:
parent
df3e01b921
commit
603ee5a1fc
@ -19,7 +19,7 @@ Public Class HistoryModel
|
|||||||
oSql += " (@ENVELOPE_ID "
|
oSql += " (@ENVELOPE_ID "
|
||||||
oSql += " ,@USER_REFERENCE "
|
oSql += " ,@USER_REFERENCE "
|
||||||
oSql += " ,@ACTION_TYPE "
|
oSql += " ,@ACTION_TYPE "
|
||||||
oSql += " ,@ACTION_DESCRIPTION) "
|
oSql += " ,@ACTION_DESCRIPTION "
|
||||||
oSql += " ,@ACTION_DATE) "
|
oSql += " ,@ACTION_DATE) "
|
||||||
|
|
||||||
Dim oCommand As New SqlCommand(oSql)
|
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("USER_REFERENCE", SqlDbType.NVarChar).Value = pHistory.UserReference
|
||||||
oCommand.Parameters.Add("ACTION_TYPE", SqlDbType.NVarChar).Value = pHistory
|
oCommand.Parameters.Add("ACTION_TYPE", SqlDbType.NVarChar).Value = pHistory
|
||||||
oCommand.Parameters.Add("ACTION_DESCRIPTION", SqlDbType.NVarChar).Value = pHistory.ActionDescription
|
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
|
If Database.ExecuteNonQuery(oCommand) Then
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@ -31,11 +31,9 @@ Public Class EnvelopeEditorController
|
|||||||
|
|
||||||
#Region "Public"
|
#Region "Public"
|
||||||
Public Function SendEnvelope() As Boolean
|
Public Function SendEnvelope() As Boolean
|
||||||
Dim oResult As Boolean = True
|
|
||||||
|
|
||||||
For Each receiverItem As EnvelopeReceiver In Envelope.Receivers
|
For Each receiverItem As EnvelopeReceiver In Envelope.Receivers
|
||||||
|
|
||||||
Dim oEmailData As EmailData = New EmailData With
|
Dim oEmailData As New EmailData With
|
||||||
{
|
{
|
||||||
.EmailAdress = receiverItem.Email,
|
.EmailAdress = receiverItem.Email,
|
||||||
.EmailSubject = Envelope.Subject,
|
.EmailSubject = Envelope.Subject,
|
||||||
@ -48,12 +46,12 @@ Public Class EnvelopeEditorController
|
|||||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, Envelope.Uuid, receiverItem.Signature)
|
.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)
|
oTemplate.FillEmailBody(oEmailData)
|
||||||
|
|
||||||
If EmailModel.Insert(oEmailData) = False Then
|
If EmailModel.Insert(oEmailData) = False Then
|
||||||
Logger.Error("EMail data could not be inserted.")
|
Logger.Error("EMail data could not be inserted.")
|
||||||
oResult = False
|
Dim oResult As Boolean = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
@ -97,12 +95,13 @@ Public Class EnvelopeEditorController
|
|||||||
|
|
||||||
Dim newHistoryEntry As New EnvelopeHistoryEntry With {
|
Dim newHistoryEntry As New EnvelopeHistoryEntry With {
|
||||||
.EnvelopeId = oEnvelope.Id,
|
.EnvelopeId = oEnvelope.Id,
|
||||||
.Status = HistoryStatus.Created,
|
.ActionType = ActionType.Created,
|
||||||
.ActionTitle = "Envelope erstellt",
|
|
||||||
.ActionDescription = "Envelope wurde neu erstellt",
|
.ActionDescription = "Envelope wurde neu erstellt",
|
||||||
.UserEmailAddress = oEnvelope.User.Email
|
.UserEmailAddress = oEnvelope.User.Email
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HistoryModel.Insert(newHistoryEntry)
|
||||||
|
|
||||||
Return oEnvelope
|
Return oEnvelope
|
||||||
Else
|
Else
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@ -159,7 +158,7 @@ Public Class EnvelopeEditorController
|
|||||||
Public Function CreateDocument(pDocumentFilePath As String) As EnvelopeDocument
|
Public Function CreateDocument(pDocumentFilePath As String) As EnvelopeDocument
|
||||||
Try
|
Try
|
||||||
Dim oFileInfo = New FileInfo(pDocumentFilePath)
|
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)
|
Dim oTempFilePath = Path.Combine(oTempFiles.TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
|
||||||
File.Copy(oFileInfo.FullName, oTempFilePath, True)
|
File.Copy(oFileInfo.FullName, oTempFilePath, True)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user