Status-Anzeige Hauptschirm
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Net.Mail
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
|
||||
@@ -12,14 +11,28 @@ Public Class ReceiverModel
|
||||
End Sub
|
||||
|
||||
Private Function ToReceiver(pRow As DataRow, pColorIndex As Integer) As EnvelopeReceiver
|
||||
|
||||
Dim EmailAdress As String = pRow.ItemEx("EMAIL_ADDRESS", "")
|
||||
Dim EnvelopeId As Integer = pRow.ItemEx("ENVELOPE_ID", 0)
|
||||
Dim SignedDate As DateTime = DateTime.MinValue
|
||||
Dim ReceiverSignedStatus As ReceiverStatus = ReceiverStatus.Unsigned
|
||||
|
||||
If String.IsNullOrEmpty(EmailAdress) = False Then
|
||||
SignedDate = GetSignedDate(EmailAdress, EnvelopeId)
|
||||
If SignedDate <> DateTime.MinValue Then
|
||||
ReceiverSignedStatus = ReceiverStatus.Signed
|
||||
End If
|
||||
End If
|
||||
|
||||
Return New EnvelopeReceiver() With {
|
||||
.Id = pRow.ItemEx("GUID", 0),
|
||||
.Email = pRow.ItemEx("EMAIL_ADDRESS", ""),
|
||||
.Name = pRow.ItemEx("NAME", ""),
|
||||
.Sequence = pRow.ItemEx("SEQUENCE", 0),
|
||||
.Signature = pRow.ItemEx("SIGNATURE", ""),
|
||||
.Status = ReceiverStatus.Unsigned,
|
||||
.ColorType = DirectCast(pColorIndex + 1, ColorType)
|
||||
.Status = ReceiverSignedStatus,
|
||||
.ColorType = DirectCast(pColorIndex + 1, ColorType),
|
||||
.SignedDate = SignedDate
|
||||
}
|
||||
End Function
|
||||
|
||||
@@ -211,5 +224,15 @@ Public Class ReceiverModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetSignedDate(pEmailAdress As String, pEnvleopeId As Integer) As Date
|
||||
Try
|
||||
Return Database.GetScalarValue($"SELECT ACTION_DATE FROM [DD_ECM].[dbo].[TBSIG_ENVELOPE_HISTORY] WHERE ENVELOPE_ID = {pEnvleopeId}
|
||||
AND USER_REFERENCE = '{pEmailAdress}' AND [STATUS] = 2002")
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user