einfach alles
This commit is contained in:
@@ -14,6 +14,13 @@
|
||||
|
||||
Public Property Documents As New List(Of EnvelopeDocument)
|
||||
Public Property Receivers As New List(Of EnvelopeReceiver)
|
||||
Public Property History As New List(Of EnvelopeHistoryEntry)
|
||||
|
||||
Public ReadOnly Property IsAlreadySent As Boolean
|
||||
Get
|
||||
Return Status > Constants.EnvelopeStatus.EnvelopeSaved
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property StatusTranslated As String
|
||||
Get
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
Public Class EnvelopeHistoryEntry
|
||||
Public EnvelopeId As Integer
|
||||
Public UserReference As String
|
||||
Public Status As Constants.EnvelopeStatus
|
||||
Public ActionDate As Date = Now()
|
||||
Public Property EnvelopeId As Integer
|
||||
Public Property UserReference As String
|
||||
Public Property Status As Constants.EnvelopeStatus
|
||||
Public ReadOnly Property StatusTranslated As String
|
||||
Get
|
||||
Dim oStatus = Status.ToString()
|
||||
Return My.Resources.Model.ResourceManager.GetString(oStatus)
|
||||
End Get
|
||||
End Property
|
||||
Public Property ActionDate As Date = Now()
|
||||
End Class
|
||||
|
||||
@@ -82,7 +82,7 @@ Namespace Jobs
|
||||
|
||||
GenerateFinalPDF(oEnvelopeData)
|
||||
Dim oReport As Byte() = Await GenerateReportPdf(oId)
|
||||
MergeDocuments()
|
||||
'MergeDocuments()
|
||||
|
||||
Next
|
||||
|
||||
|
||||
@@ -8,14 +8,17 @@ Public Class EnvelopeModel
|
||||
|
||||
Private ReadOnly UserModel As UserModel
|
||||
Private ReadOnly ReceiverModel As ReceiverModel
|
||||
Private ReadOnly HistoryModel As HistoryModel
|
||||
Private ReadOnly DocumentModel As DocumentModel
|
||||
|
||||
|
||||
Public Sub New(pState As State)
|
||||
MyBase.New(pState)
|
||||
|
||||
UserModel = New UserModel(pState)
|
||||
ReceiverModel = New ReceiverModel(pState)
|
||||
DocumentModel = New DocumentModel(pState)
|
||||
HistoryModel = New HistoryModel(pState)
|
||||
End Sub
|
||||
|
||||
Private Function ToEnvelope(pRow As DataRow) As Envelope
|
||||
@@ -35,6 +38,7 @@ Public Class EnvelopeModel
|
||||
oEnvelope.User = UserModel.SelectUser(oEnvelope.UserId)
|
||||
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id)
|
||||
oEnvelope.Documents = DocumentModel.List(oEnvelope.Id)
|
||||
oEnvelope.History = HistoryModel.List(oEnvelope.Id)
|
||||
|
||||
Return oEnvelope
|
||||
End Function
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports DigitalData.Modules.Base
|
||||
|
||||
Public Class HistoryModel
|
||||
Inherits BaseModel
|
||||
@@ -7,6 +8,24 @@ Public Class HistoryModel
|
||||
MyBase.New(pState)
|
||||
End Sub
|
||||
|
||||
Private Function ToEnvelopeHistoryEntry(pRow As DataRow) As EnvelopeHistoryEntry
|
||||
Return New EnvelopeHistoryEntry() With {
|
||||
.ActionDate = pRow.Item("ACTION_DATE"),
|
||||
.EnvelopeId = pRow.Item("ENVELOPE_ID"),
|
||||
.Status = pRow.Item("STATUS"),
|
||||
.UserReference = pRow.ItemEx("USER_REFERENCE", "")
|
||||
}
|
||||
End Function
|
||||
|
||||
Public Function List(pEnvelopeId As Integer) As List(Of EnvelopeHistoryEntry)
|
||||
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE_HISTORY WHERE ENVELOPE_ID = {pEnvelopeId} AND STATUS < 3000 ORDER BY ADDED_WHEN DESC"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
Return oTable?.Rows.
|
||||
Cast(Of DataRow).
|
||||
Select(AddressOf ToEnvelopeHistoryEntry).
|
||||
ToList()
|
||||
End Function
|
||||
|
||||
Public Function Insert(pHistory As EnvelopeHistoryEntry) As Boolean
|
||||
Try
|
||||
Dim oSql = "INSERT INTO [dbo].[TBSIG_ENVELOPE_HISTORY] "
|
||||
|
||||
Reference in New Issue
Block a user