Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator
This commit is contained in:
@@ -19,6 +19,7 @@ Public Class EmailData
|
||||
Public Property EmailAttachment As String = ""
|
||||
Public Property ATT1_RELATED_ID As Long
|
||||
Public Property ATT1_REL_TYPE As String = ""
|
||||
Public Property ADDED_WHO_PROCESS As String = "DDEnvelopGenerator"
|
||||
|
||||
''' <summary>
|
||||
''' Constructor for sending email to receiver
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
Public Property History As New List(Of EnvelopeHistoryEntry)
|
||||
Public Property EnvelopeType As EnvelopeType
|
||||
Public Property DOC_RESULT As Byte()
|
||||
Public Property CURRENT_WORK_APP As String = "signFLOW GUI"
|
||||
Public ReadOnly Property EnvelopeTypeTitle As String
|
||||
Get
|
||||
Return EnvelopeType?.Title
|
||||
|
||||
@@ -281,6 +281,7 @@
|
||||
<Compile Include="Entities\ElementStatus.vb" />
|
||||
<Compile Include="Entities\EmailData.vb" />
|
||||
<Compile Include="Entities\EmailTemplate.vb" />
|
||||
<Compile Include="Jobs\APIBackendJobs\APIEnvelopeJob.vb" />
|
||||
<Compile Include="Jobs\FinalizeDocument\PDFBurnerParams.vb" />
|
||||
<Compile Include="Services\TemplateService.vb" />
|
||||
<Compile Include="Entities\Envelope.vb" />
|
||||
|
||||
@@ -52,6 +52,7 @@ Public Class Helpers
|
||||
End Function
|
||||
|
||||
Public Shared Function GetEnvelopeURL(pHost As String, pEnvelopeUuid As String, pReceiverSignature As String) As String
|
||||
|
||||
Dim oEnvelopeUserReference As String = EncodeEnvelopeReceiverId(pEnvelopeUuid, pReceiverSignature)
|
||||
Dim oURL As String = String.Format("{0}/EnvelopeKey/{1}", pHost.Trim(), oEnvelopeUserReference)
|
||||
Return oURL
|
||||
|
||||
221
EnvelopeGenerator.Common/Jobs/APIBackendJobs/APIEnvelopeJob.vb
Normal file
221
EnvelopeGenerator.Common/Jobs/APIBackendJobs/APIEnvelopeJob.vb
Normal file
@@ -0,0 +1,221 @@
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports GdPicture14
|
||||
Imports Quartz
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.IO
|
||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports DevExpress.DataProcessing
|
||||
Imports System.Data.SqlClient
|
||||
Imports DevExpress.XtraRichEdit.Layout.Engine
|
||||
|
||||
Namespace Jobs
|
||||
Public Class APIEnvelopeJob
|
||||
Implements IJob
|
||||
|
||||
|
||||
Private LogConfig As LogConfig
|
||||
Private Logger As Logger
|
||||
Private Database As MSSQLServer
|
||||
Private Config As DbConfig
|
||||
|
||||
Private ConfigModel As ConfigModel
|
||||
Private EnvelopeModel As EnvelopeModel
|
||||
Private ReceiverModel As ReceiverModel
|
||||
Private ActionService As ActionService
|
||||
|
||||
|
||||
Private ReadOnly CompleteWaitTime As Integer = 1
|
||||
|
||||
Private myTempFiles As TempFiles
|
||||
|
||||
Private Class EnvelopeData
|
||||
Public EnvelopeId As Integer
|
||||
Public EnvelopeUUID As String
|
||||
Public DocumentPath As String
|
||||
End Class
|
||||
|
||||
Public Function Execute(pContext As IJobExecutionContext) As Task Implements IJob.Execute
|
||||
LogConfig = pContext.MergedJobDataMap.Item(Constants.LOGCONFIG)
|
||||
Logger = LogConfig.GetLogger()
|
||||
myTempFiles = New TempFiles(LogConfig)
|
||||
myTempFiles.Create()
|
||||
Dim JobId = pContext.JobDetail.Key
|
||||
Logger.Debug("API Envelopes - Starting job {0}", JobId)
|
||||
|
||||
Try
|
||||
Logger.Debug("API Envelopes - Loading Database..")
|
||||
Database = GetDatabase(pContext, LogConfig)
|
||||
|
||||
Logger.Debug("API Envelopes - Loading Models & Services")
|
||||
Dim oState = GetState()
|
||||
InitializeModels(oState)
|
||||
|
||||
Logger.Debug("API Envelopes - Loading Configuration..")
|
||||
Config = ConfigModel.LoadConfiguration()
|
||||
oState.DbConfig = Config
|
||||
|
||||
InitializeServices(oState)
|
||||
Config.DocumentPath = Config.DocumentPath
|
||||
|
||||
Logger.Debug("API Envelopes - ExportPath: [{0}]", Config.ExportPath)
|
||||
|
||||
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE where SOURCE = 'API' AND STATUS = 1003 order by guid"
|
||||
Dim oDTEnv_invitations = Database.GetDatatable(oSql)
|
||||
|
||||
Dim oEnvelopeIds As List(Of Integer) = oDTEnv_invitations.Rows.Cast(Of DataRow).
|
||||
Select(Function(r) r.Item("GUID")).
|
||||
Cast(Of Integer).
|
||||
ToList()
|
||||
|
||||
If oEnvelopeIds.Count > 0 Then
|
||||
Logger.Info("SendInvMail - Found [{0}] envelopes.", oEnvelopeIds.Count)
|
||||
End If
|
||||
|
||||
Dim oTotal As Integer = oEnvelopeIds.Count
|
||||
Dim oCurrent As Integer = 1
|
||||
|
||||
For Each oId In oEnvelopeIds
|
||||
Logger.Info("SendInvMail - Gathering Info for Envelope [{0}] ({1}/{2})", oId, oCurrent, oTotal)
|
||||
Try
|
||||
Dim oEnvelope = EnvelopeModel.GetById(oId)
|
||||
|
||||
If oEnvelope Is Nothing Then
|
||||
Logger.Warn("SendInvMail - Envelope could not be loaded for Id [{0}]!", oId)
|
||||
Throw New ArgumentNullException("EnvelopeData")
|
||||
End If
|
||||
oEnvelope.CURRENT_WORK_APP = "signFLOW_API_EnvJob_InvMail"
|
||||
Logger.Debug("SendInvMail - Loading Envelope Data..")
|
||||
Dim oEnvelopeData = GetEnvelopeData(oId)
|
||||
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id).ToList()
|
||||
Logger.Debug("SendInvMail - Created Reveivers!")
|
||||
If oEnvelopeData Is Nothing Then
|
||||
Logger.Warn("SendInvMail - EnvelopeData could not be loaded for Id [{0}]!", oId)
|
||||
Throw New ArgumentNullException("EnvelopeData")
|
||||
End If
|
||||
Logger.Info("SendInvMail - Sending InvitationMails for Envelope [{0}]", oId)
|
||||
If ActionService.SendEnvelope(oEnvelope) = False Then
|
||||
Logger.Warn("SendInvMail - Could not send the InvitationMails for Envelope [{0}]", oId)
|
||||
Throw New ArgumentNullException("EnvelopeData")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn(ex, $"SendInvMail - Unhandled exception while working envelope [{oId}]")
|
||||
End Try
|
||||
|
||||
oCurrent += 1
|
||||
Logger.Info("SendInvMail - Envelope finalized!")
|
||||
|
||||
Next
|
||||
'Hier nun der Teil um zurückgezogene Envelopes abzuarbeiten
|
||||
oSql = $"SELECT ENV.GUID,REJ.COMMENT REJECTION_REASON FROM
|
||||
(SELECT * FROM TBSIG_ENVELOPE where STATUS = 1009 AND SOURCE = 'API') ENV INNER JOIN
|
||||
(SELECT MAX(GUID) GUID,ENVELOPE_ID,MAX(ADDED_WHEN) ADDED_WHEN,MAX(ACTION_DATE) ACTION_DATE, COMMENT FROM TBSIG_ENVELOPE_HISTORY where STATUS = 1009 GROUP BY ENVELOPE_ID,COMMENT ) REJ ON ENV.GUID = REJ.ENVELOPE_ID LEFT JOIN
|
||||
(SELECT * FROM TBSIG_ENVELOPE_HISTORY where STATUS = 3004 ) M_Send ON ENV.GUID = M_Send.ENVELOPE_ID
|
||||
where M_Send.GUID IS NULL"
|
||||
Dim oDT_EnvWithdrawn = Database.GetDatatable(oSql)
|
||||
|
||||
oEnvelopeIds = oDTEnv_invitations.Rows.Cast(Of DataRow).
|
||||
Select(Function(r) r.Item("GUID")).
|
||||
Cast(Of Integer).
|
||||
ToList()
|
||||
|
||||
If oEnvelopeIds.Count > 0 Then
|
||||
Logger.Info("WithdrawnEnv - Found [{0}] envelopes.", oEnvelopeIds.Count)
|
||||
End If
|
||||
|
||||
oTotal = oEnvelopeIds.Count
|
||||
oCurrent = 1
|
||||
Dim oEnvID As Integer
|
||||
For Each oRow As DataRow In oDT_EnvWithdrawn.Rows
|
||||
oEnvID = oRow.Item("GUID")
|
||||
Dim oReason = oRow.Item("REJECTION_REASON")
|
||||
Logger.Info("WithdrawnEnv - Gathering Info for Envelope [{0}] ({1}/{2})", oEnvID, oCurrent, oTotal)
|
||||
Try
|
||||
Dim oEnvelope = EnvelopeModel.GetById(oEnvID)
|
||||
If oEnvelope Is Nothing Then
|
||||
Logger.Warn("WithdrawnEnv - Envelope could not be loaded for Id [{0}]!", oEnvID)
|
||||
Throw New ArgumentNullException("EnvelopeData")
|
||||
End If
|
||||
oEnvelope.CURRENT_WORK_APP = "signFLOW_API_EnvJob_Withdrawn"
|
||||
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id).ToList()
|
||||
|
||||
Logger.Debug("WithdrawnEnv - Sending Withdrawn Mails..")
|
||||
|
||||
If ActionService.API_SendWithdrawn_Mails(oEnvelope, oReason) = False Then
|
||||
Logger.Warn("Could not send the Mails for withdrawn Envelope")
|
||||
Else
|
||||
Dim oStatInsert = $"INSERT INTO TBSIG_ENVELOPE_HISTORY (ENVELOPE_ID,STATUS,USER_REFERENCE,ADDED_WHEN,ACTION_DATE) VALUES ('{oEnvelope.Id}',3004,'API',GETDATE(),GETDATE())"
|
||||
Database.ExecuteNonQuery(oStatInsert)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn(ex, $"WithdrawnEnv - Unhandled exception while working envelope [{oEnvID}]")
|
||||
End Try
|
||||
|
||||
oCurrent += 1
|
||||
Logger.Info("WithdrawnEnv - Envelope finalized!")
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Logger.Debug("API Envelopes - Completed job {0} successfully!", JobId)
|
||||
Catch ex As Exception
|
||||
Logger.Warn("API Envelopes job failed!")
|
||||
Logger.Error(ex)
|
||||
Finally
|
||||
Logger.Debug("API Envelopes execution for [{0}] ended", JobId)
|
||||
End Try
|
||||
|
||||
Return Task.FromResult(True)
|
||||
End Function
|
||||
Private Sub InitializeModels(pState As State)
|
||||
ConfigModel = New ConfigModel(pState)
|
||||
EnvelopeModel = New EnvelopeModel(pState)
|
||||
ReceiverModel = New ReceiverModel(pState)
|
||||
End Sub
|
||||
Private Sub InitializeServices(pState As State)
|
||||
ActionService = New ActionService(pState, Database)
|
||||
End Sub
|
||||
Private Function GetDatabase(pContext As IJobExecutionContext, pLogConfig As LogConfig) As MSSQLServer
|
||||
Dim oConnectionString As String = pContext.MergedJobDataMap.Item(Constants.DATABASE)
|
||||
Dim Database = New MSSQLServer(pLogConfig, MSSQLServer.DecryptConnectionString(oConnectionString))
|
||||
|
||||
Return Database
|
||||
End Function
|
||||
Private Function GetEnvelopeData(pEnvelopeId As Integer) As EnvelopeData
|
||||
Dim oSql = $"SELECT T.GUID, T.ENVELOPE_UUID,T2.FILEPATH, T2.BYTE_DATA FROM [dbo].[TBSIG_ENVELOPE] T
|
||||
JOIN TBSIG_ENVELOPE_DOCUMENT T2 ON T.GUID = T2.ENVELOPE_ID
|
||||
WHERE T.GUID = {pEnvelopeId}"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSql)
|
||||
Dim oRow As DataRow = oTable.Rows.Cast(Of DataRow).SingleOrDefault()
|
||||
If oRow Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Dim oData As New EnvelopeData With {
|
||||
.EnvelopeId = pEnvelopeId,
|
||||
.DocumentPath = oRow.ItemEx("FILEPATH", ""),
|
||||
.EnvelopeUUID = oRow.ItemEx("ENVELOPE_UUID", "")
|
||||
}
|
||||
|
||||
Logger.Debug("Document path: [{0}]", oData.DocumentPath)
|
||||
|
||||
Return oData
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Private Function GetState() As State
|
||||
Return New State With {
|
||||
.LogConfig = LogConfig,
|
||||
.Database = Database,
|
||||
.UserId = 0,
|
||||
.Config = Nothing,
|
||||
.DbConfig = Nothing
|
||||
}
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -53,7 +53,7 @@ Namespace Jobs
|
||||
myTempFiles = New TempFiles(LogConfig)
|
||||
myTempFiles.Create()
|
||||
Dim JobId = pContext.JobDetail.Key
|
||||
Logger.Info("Starting job {0}", JobId)
|
||||
Logger.Debug("Starting job {0}", JobId)
|
||||
|
||||
Try
|
||||
Logger.Debug("Loading GdViewer..")
|
||||
@@ -108,7 +108,6 @@ Namespace Jobs
|
||||
|
||||
For Each oId In oEnvelopeIds
|
||||
Logger.Info("Finalizing Envelope [{0}] ({1}/{2})", oId, oCurrent, oTotal)
|
||||
Logger.Debug("Loading Envelope..")
|
||||
Try
|
||||
Dim oEnvelope = EnvelopeModel.GetById(oId)
|
||||
If oEnvelope Is Nothing Then
|
||||
@@ -147,7 +146,7 @@ Namespace Jobs
|
||||
Directory.CreateDirectory(oOutputDirectoryPath)
|
||||
End If
|
||||
Dim oOutputFilePath = Path.Combine(oOutputDirectoryPath, $"{oEnvelope.Uuid}.pdf")
|
||||
Logger.Info("Writing finalized Pdf to disk..")
|
||||
Logger.Debug("Writing finalized Pdf to disk..")
|
||||
Logger.Info("Output path is [{0}]", oOutputFilePath)
|
||||
|
||||
Try
|
||||
@@ -157,12 +156,14 @@ Namespace Jobs
|
||||
Throw New ExportDocumentException("Could not export final document to disk!", ex)
|
||||
End Try
|
||||
|
||||
Logger.Info("Writing EB-bytes to database...")
|
||||
Logger.Debug("Writing EB-bytes to database...")
|
||||
Update_File_DB(oOutputFilePath, oEnvelope.Id)
|
||||
|
||||
Logger.Info("Sending finalized report-mails..")
|
||||
|
||||
If SendFinalEmails(oEnvelope) = False Then ', oOutputFilePath
|
||||
Throw New ApplicationException("Final emails could not be sent!")
|
||||
Else
|
||||
Logger.Info("Report-mails successfully sent!")
|
||||
End If
|
||||
Logger.Debug("Setting envelope status..")
|
||||
If ActionService.FinalizeEnvelope(oEnvelope) = False Then
|
||||
@@ -175,7 +176,7 @@ Namespace Jobs
|
||||
|
||||
|
||||
oCurrent += 1
|
||||
Logger.Info("Envelope finalized!")
|
||||
Logger.Info($"Envelope [{oId}] finalized!")
|
||||
|
||||
Next
|
||||
|
||||
@@ -192,7 +193,7 @@ Namespace Jobs
|
||||
Logger.Warn("Certificate Document job failed!")
|
||||
Logger.Error(ex)
|
||||
Finally
|
||||
Logger.Info("Job execution for [{0}] ended", JobId)
|
||||
Logger.Debug("Job execution for [{0}] ended", JobId)
|
||||
End Try
|
||||
|
||||
Return Task.FromResult(True)
|
||||
@@ -290,11 +291,15 @@ Namespace Jobs
|
||||
If oMailToCreator <> FinalEmailType.No Then
|
||||
Logger.Debug("Sending email to creator ...")
|
||||
SendFinalEmailToCreator(pEnvelope) ', pAttachment
|
||||
Else
|
||||
Logger.Warn($"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{FinalEmailType.No}] ")
|
||||
End If
|
||||
|
||||
If oMailToReceivers <> FinalEmailType.No Then
|
||||
Logger.Debug("Sending emails to receivers..")
|
||||
SendFinalEmailToReceivers(pEnvelope) ', pAttachment
|
||||
Else
|
||||
Logger.Warn($"No SendFinalEmailToReceivers - oMailToCreator [{oMailToReceivers}] <> [{FinalEmailType.No}] ")
|
||||
End If
|
||||
|
||||
Return True
|
||||
@@ -355,9 +360,9 @@ Namespace Jobs
|
||||
oInputPath = pEnvelopeData.DocumentPath
|
||||
Logger.Info($"Input path: [{oInputPath}]")
|
||||
Else
|
||||
Logger.Info($"we got bytes..")
|
||||
Logger.Debug($"we got bytes..")
|
||||
oInputPath = Config.DocumentPathOrigin
|
||||
Logger.Info($"oInputPath: {Config.DocumentPathOrigin}")
|
||||
Logger.Debug($"oInputPath: {Config.DocumentPathOrigin}")
|
||||
End If
|
||||
|
||||
|
||||
@@ -421,7 +426,7 @@ Namespace Jobs
|
||||
End Function
|
||||
|
||||
Private Sub InitializeServices(pState As State)
|
||||
ActionService = New ActionService(pState)
|
||||
ActionService = New ActionService(pState, Database)
|
||||
End Sub
|
||||
|
||||
Private Sub InitializeModels(pState As State)
|
||||
|
||||
@@ -18,7 +18,7 @@ Public Class EmailModel
|
||||
oCommand.Parameters.Add("EMAIL_ADRESS", SqlDbType.NVarChar).Value = pEmail.EmailAdress
|
||||
oCommand.Parameters.Add("EMAIL_SUBJ", SqlDbType.NVarChar).Value = pEmail.EmailSubject
|
||||
oCommand.Parameters.Add("EMAIL_BODY", SqlDbType.NVarChar).Value = pEmail.EmailBody
|
||||
oCommand.Parameters.Add("ADDED_WHO", SqlDbType.NVarChar).Value = "DDEnvelopGenerator"
|
||||
oCommand.Parameters.Add("ADDED_WHO", SqlDbType.NVarChar).Value = pEmail.ADDED_WHO_PROCESS
|
||||
oCommand.Parameters.Add("SENDING_PROFILE", SqlDbType.Int).Value = State.DbConfig.SendingProfile
|
||||
oCommand.Parameters.Add("REFERENCE_ID", SqlDbType.Int).Value = pEmail.ReferenceID
|
||||
oCommand.Parameters.Add("REFERENCE_STRING", SqlDbType.NVarChar).Value = pEmail.ReferenceString
|
||||
|
||||
@@ -35,7 +35,7 @@ Public Class EnvelopeModel
|
||||
.Language = pRow.ItemEx("LANGUAGE", "de-DE"),
|
||||
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())),
|
||||
.AddedWhen = pRow.Item("ADDED_WHEN"),
|
||||
.ChangedWhen = pRow.Item("CHANGED_WHEN"),
|
||||
.ChangedWhen = pRow.ItemEx(Of Date)("CHANGED_WHEN", Nothing),
|
||||
.CertificationType = ObjectEx.ToEnum(Of Constants.CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", Constants.CertificationType.AdvancedElectronicSignature.ToString())),
|
||||
.User = New User(),
|
||||
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.5.0.0")>
|
||||
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.7.0.0")>
|
||||
|
||||
@@ -2,19 +2,24 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Common.My.Resources
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class ActionService
|
||||
Inherits BaseService
|
||||
|
||||
|
||||
Private ReadOnly EmailService As EmailService
|
||||
Private ReadOnly HistoryService As HistoryService
|
||||
|
||||
Private ReadOnly ReceiverModel As ReceiverModel
|
||||
|
||||
Private myDatabase As MSSQLServer
|
||||
|
||||
Public Sub New(pState As State)
|
||||
|
||||
Public Sub New(pState As State, pDD_ECM As MSSQLServer)
|
||||
MyBase.New(pState)
|
||||
|
||||
myDatabase = pDD_ECM
|
||||
EmailService = New EmailService(pState)
|
||||
HistoryService = New HistoryService(pState)
|
||||
ReceiverModel = New ReceiverModel(pState)
|
||||
@@ -63,6 +68,8 @@ Public Class ActionService
|
||||
Else
|
||||
oStatus = Constants.EnvelopeStatus.EnvelopeDeleted
|
||||
End If
|
||||
Dim oUpd = $"UPDATE TBSIG_ENVELOPE SET REJECTION_REASON = '{pReason}' WHERE GUID = {pEnvelope.Id}"
|
||||
myDatabase.ExecuteNonQuery(oUpd)
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, oStatus, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
@@ -77,6 +84,15 @@ Public Class ActionService
|
||||
|
||||
Return True
|
||||
End Function
|
||||
Public Function API_SendWithdrawn_Mails(pEnvelope As Envelope, pReason As String) As Boolean
|
||||
Dim oSendResult As Boolean = False
|
||||
For Each oReceiver As EnvelopeReceiver In pEnvelope.Receivers
|
||||
If EmailService.SendEnvelopeDeletedEmail(pEnvelope, oReceiver, pReason) = False Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function OpenEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Dim oUserReference = pReceiver.Email
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
|
||||
Public Class BaseService
|
||||
Inherits BaseClass
|
||||
|
||||
Friend Property State As State
|
||||
|
||||
Public Sub New(pState As State)
|
||||
MyBase.New(pState.LogConfig)
|
||||
|
||||
State = pState
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -17,10 +17,11 @@ Public Class EmailService
|
||||
End Sub
|
||||
|
||||
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pReason As String) As Boolean
|
||||
Logger.Debug("Creating email data object.")
|
||||
Logger.Debug("SendEnvelopeDeletedEmail - Creating email data object...")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageDeletionSent) With
|
||||
{
|
||||
.SignatureLink = ""
|
||||
.SignatureLink = "",
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
}
|
||||
|
||||
EmailTemplate.FillEnvelopeDeletedEmailBody(oEmailData, pReason)
|
||||
@@ -37,7 +38,8 @@ Public Class EmailService
|
||||
Logger.Debug("Creating email data object.")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||
{
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature)
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
}
|
||||
|
||||
EmailTemplate.FillDocumentReceivedEmailBody(oEmailData)
|
||||
@@ -51,9 +53,13 @@ Public Class EmailService
|
||||
End Function
|
||||
|
||||
Public Function GetReceiverUrl(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As String
|
||||
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||
{
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature)
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
}
|
||||
Return oEmailData.SignatureLink
|
||||
End Function
|
||||
@@ -61,9 +67,13 @@ Public Class EmailService
|
||||
|
||||
Public Function SendDocumentAccessCodeReceivedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Logger.Debug("Creating email data object.")
|
||||
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageAccessCodeSent) With
|
||||
{
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature)
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
}
|
||||
|
||||
EmailTemplate.FillDocumentAccessCodeReceivedEmailBody(oEmailData)
|
||||
|
||||
27
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
27
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
@@ -325,15 +325,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property ModificationOriginFile_FormFields() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("ModificationOriginFile_FormFields", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Nein ähnelt.
|
||||
'''</summary>
|
||||
@@ -370,6 +361,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie die 2-Faktor Definition für diesen Empfänger zurücksetzen. Der Empfänger muss sich dann neu identifizieren! ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property ResetTOTPUser() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("ResetTOTPUser", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Gespeichert ähnelt.
|
||||
'''</summary>
|
||||
@@ -415,6 +415,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Erfolgreich! Dialog wird geschlossen. ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property Success_FormClose() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("Success_FormClose", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Unsigniert ähnelt.
|
||||
'''</summary>
|
||||
|
||||
@@ -210,6 +210,9 @@
|
||||
<data name="ReadAndSign" xml:space="preserve">
|
||||
<value>Read and Sign</value>
|
||||
</data>
|
||||
<data name="ResetTOTPUser" xml:space="preserve">
|
||||
<value>Do you want to reset the 2-factor definition for this receiver? The receiver must then identify itself again!</value>
|
||||
</data>
|
||||
<data name="Saved" xml:space="preserve">
|
||||
<value>Saved</value>
|
||||
</data>
|
||||
@@ -225,6 +228,9 @@
|
||||
<data name="Signed" xml:space="preserve">
|
||||
<value>Signed</value>
|
||||
</data>
|
||||
<data name="Success_FormClose" xml:space="preserve">
|
||||
<value>Successful! Dialog is closed.successful! Dialog is closed.</value>
|
||||
</data>
|
||||
<data name="Unsigned" xml:space="preserve">
|
||||
<value>Unsigned</value>
|
||||
</data>
|
||||
|
||||
@@ -216,6 +216,9 @@
|
||||
<data name="ReadAndSign" xml:space="preserve">
|
||||
<value>Arbeitsanweisung</value>
|
||||
</data>
|
||||
<data name="ResetTOTPUser" xml:space="preserve">
|
||||
<value>Wollen Sie die 2-Faktor Definition für diesen Empfänger zurücksetzen. Der Empfänger muss sich dann neu identifizieren!</value>
|
||||
</data>
|
||||
<data name="Saved" xml:space="preserve">
|
||||
<value>Gespeichert</value>
|
||||
</data>
|
||||
@@ -231,6 +234,9 @@
|
||||
<data name="Signed" xml:space="preserve">
|
||||
<value>Signiert</value>
|
||||
</data>
|
||||
<data name="Success_FormClose" xml:space="preserve">
|
||||
<value>Erfolgreich! Dialog wird geschlossen.</value>
|
||||
</data>
|
||||
<data name="Unsigned" xml:space="preserve">
|
||||
<value>Unsigniert</value>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user