job
This commit is contained in:
@@ -81,7 +81,8 @@ Namespace Jobs
|
||||
End If
|
||||
|
||||
GenerateFinalPDF(oEnvelopeData)
|
||||
Await GenerateReportPdf(oId)
|
||||
Dim oReport As Byte() = Await GenerateReportPdf(oId)
|
||||
MergeDocuments()
|
||||
|
||||
Next
|
||||
|
||||
@@ -139,13 +140,13 @@ Namespace Jobs
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Async Function GenerateReportPdf(pEnvelopeId As Integer) As Task(Of Boolean)
|
||||
Private Async Function GenerateReportPdf(pEnvelopeId As Integer) As Task(Of Byte())
|
||||
Dim oSql As String = $"SELECT * FROM VWSIG_ENVELOPE_REPORT WHERE ENVELOPE_ID = {pEnvelopeId}"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSql)
|
||||
Dim oItems = GetReportSource(oTable)
|
||||
|
||||
If oItems.Count = 0 Then
|
||||
Return False
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Dim oState As New State() With {
|
||||
@@ -158,7 +159,7 @@ Namespace Jobs
|
||||
Dim oCreator As New ReportCreator(oEnvelope)
|
||||
Dim oBuffer = Await oCreator.CreateReport(oItems)
|
||||
|
||||
Return True
|
||||
Return oBuffer
|
||||
End Function
|
||||
|
||||
Private Function GetReportSource(pDataTable As DataTable) As List(Of ReportItem)
|
||||
|
||||
Reference in New Issue
Block a user