Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator
This commit is contained in:
@@ -13,12 +13,6 @@ Public Class EmailData
|
||||
Public Property SignatureLink As String
|
||||
Public Property Message As String
|
||||
|
||||
Public ReadOnly Property EmailSubjectTranslated
|
||||
Get
|
||||
Return String.Format(My.Resources.Email.Sie_haben_ein_Dokument_zur_Unterschrift_erhalten___0_, EmailSubject)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(pEnvelope As Envelope, pReceiver As EnvelopeReceiver)
|
||||
EmailAdress = pReceiver.Email
|
||||
EmailSubject = pEnvelope.Subject
|
||||
|
||||
@@ -13,9 +13,13 @@ Public Class EmailTemplate
|
||||
|
||||
Private _replaceDictionary As Dictionary(Of String, String)
|
||||
|
||||
Public Sub New()
|
||||
Private DbConfig As DbConfig
|
||||
|
||||
Public Sub New(pState As State)
|
||||
InitBodyTemplates()
|
||||
InitSubjectTemplates()
|
||||
|
||||
DbConfig = pState.DbConfig
|
||||
End Sub
|
||||
|
||||
Private Sub InitSubjectTemplates()
|
||||
@@ -36,16 +40,16 @@ Public Class EmailTemplate
|
||||
"<MESSAGE>",
|
||||
"",
|
||||
"Mit freundlichen Grüßen",
|
||||
"<NAME_SENDER>"
|
||||
"<NAME_PORTAL>"
|
||||
}
|
||||
|
||||
_DocumentSignedBodyTemplate = New List(Of String) From {
|
||||
"Guten Tag, <NAME_RECEIVER>",
|
||||
"",
|
||||
"Ihre Unterschrift auf dem Dokument <DOCUMENT_TITLE> wurde gespeichert.",
|
||||
"hiermit bestätigen wir Ihnen die erfolgreiche Signatur für den Vorgang <DOCUMENT_TITLE>.",
|
||||
"",
|
||||
"Mit freundlichen Grüßen",
|
||||
"<NAME_SENDER>"
|
||||
"<NAME_PORTAL>"
|
||||
}
|
||||
|
||||
_DocumentDeletedBodyTemplate = New List(Of String) From {
|
||||
@@ -54,7 +58,7 @@ Public Class EmailTemplate
|
||||
"Der User <NAME_SENDER> hat den Umschlag <DOCUMENT_TITLE> gelöscht.",
|
||||
"",
|
||||
"Mit freundlichen Grüßen",
|
||||
"<NAME_SENDER>"
|
||||
"<NAME_PORTAL>"
|
||||
}
|
||||
|
||||
_DocumentCompletedBodyTemplate = New List(Of String) From {
|
||||
@@ -63,7 +67,7 @@ Public Class EmailTemplate
|
||||
"Das Dokument <DOCUMENT_TITLE> wurde von allen Beteiligten unterschrieben.",
|
||||
"",
|
||||
"Mit freundlichen Grüßen",
|
||||
"<NAME_SENDER>"
|
||||
"<NAME_PORTAL>"
|
||||
}
|
||||
End Sub
|
||||
|
||||
@@ -71,6 +75,7 @@ Public Class EmailTemplate
|
||||
_replaceDictionary = New Dictionary(Of String, String) From {
|
||||
{"<NAME_RECEIVER>", pEmailData.ReceiverName},
|
||||
{"<NAME_SENDER>", pEmailData.SenderName},
|
||||
{"<NAME_PORTAL>", DbConfig.ExternalProgramName},
|
||||
{"<SIGNATURE_TYPE>", "signieren"},
|
||||
{"<LINK_TO_DOCUMENT>", pEmailData.SignatureLink},
|
||||
{"<LINK_TO_DOCUMENT_TEXT>", $"{pEmailData.SignatureLink.Truncate(40)}.."},
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
Imports System.Drawing
|
||||
Imports System.Runtime.Serialization
|
||||
Imports DevExpress.Utils.Svg
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class EnvelopeReceiver
|
||||
Public Property Id As Integer = 0
|
||||
@@ -13,6 +15,7 @@ Public Class EnvelopeReceiver
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<JsonIgnore>
|
||||
Public ReadOnly Property Image As SvgBitmap
|
||||
Get
|
||||
Try
|
||||
|
||||
@@ -78,6 +78,9 @@
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -15,7 +15,8 @@ Public Class CertificateDocumentJob
|
||||
Dim JobId = pContext.JobDetail.Key
|
||||
oLogger.Info("Starting job {0}", JobId)
|
||||
|
||||
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {Constants.EnvelopeStatus.EnvelopeCompletelySigned}"
|
||||
Dim oCompleteStatus As Integer = Constants.EnvelopeStatus.EnvelopeCompletelySigned
|
||||
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus}"
|
||||
Dim oTable = oDatabase.GetDatatable(oSql)
|
||||
|
||||
oLogger.Info("Found [{0}] completed envelopes.", oTable.Rows.Count)
|
||||
|
||||
@@ -16,7 +16,7 @@ Public Class EmailModel
|
||||
oSql += " VALUES (@EMAIL_ADRESS, @EMAIL_SUBJ, @EMAIL_BODY, @ADDED_WHO, @SENDING_PROFILE, @REFERENCE_ID, @REFERENCE_STRING, @REMINDER_TYPE_ID, @WF_ID)"
|
||||
Dim oCommand As New SqlCommand(oSql)
|
||||
oCommand.Parameters.Add("EMAIL_ADRESS", SqlDbType.NVarChar).Value = pEmail.EmailAdress
|
||||
oCommand.Parameters.Add("EMAIL_SUBJ", SqlDbType.NVarChar).Value = pEmail.EmailSubjectTranslated
|
||||
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("SENDING_PROFILE", SqlDbType.Int).Value = State.DbConfig.SendingProfile
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class EnvelopeModel
|
||||
|
||||
Public Function List() As IEnumerable(Of Envelope)
|
||||
Try
|
||||
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_ENVELOPE] WHERE USER_ID = {State.UserId} AND STATUS IN (1001,1002,1003,1004,1005)"
|
||||
Dim oSql = $"EXEC PRSIG_GET_ENVELOPES_FOR_USER {State.UserId}"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
|
||||
Return oTable?.Rows.Cast(Of DataRow).
|
||||
|
||||
@@ -20,7 +20,7 @@ Public Class EmailService
|
||||
EnvelopeModel = New EnvelopeModel(pState)
|
||||
ReceiverModel = New ReceiverModel(pState)
|
||||
EmailModel = New EmailModel(pState)
|
||||
EmailTemplate = New EmailTemplate()
|
||||
EmailTemplate = New EmailTemplate(pState)
|
||||
End Sub
|
||||
|
||||
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="Quartz" version="3.8.0" targetFramework="net462" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user