report & service fixes

This commit is contained in:
Jonathan Jenne
2023-12-21 16:28:14 +01:00
parent 73cb1d8963
commit 119f54e8aa
14 changed files with 492 additions and 95 deletions

View File

@@ -18,14 +18,15 @@ Public Class frmReportViewer
ConfigManager = New ConfigManager(Of Config)(LogConfig, "C:\Users\JenneJ\AppData\Roaming\Digital Data\Envelope Generator\1.0.0.0")
Database = New MSSQLServer(LogConfig, MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString))
Dim oTable As DataTable = Database.GetDatatable("SELECT * FROM VWSIG_ENVELOPE_REPORT")
Dim oTable As DataTable = Database.GetDatatable("SELECT * FROM VWSIG_ENVELOPE_REPORT ORDER BY POS_WHEN DESC")
Dim oItems = GetReportSource(oTable)
If oItems.Count = 0 Then
Exit Sub
End If
Dim oEnvelopeId = oItems.First().EnvelopeId
'Dim oEnvelopeId = oItems.First().EnvelopeId
Dim oEnvelopeId = 20
Dim oState As New State() With {
.Database = Database,
@@ -34,8 +35,8 @@ Public Class frmReportViewer
EnvelopeModel = New EnvelopeModel(oState)
Dim oEnvelope = EnvelopeModel.GetById(oEnvelopeId)
Dim oCreator As New ReportCreator(oEnvelope)
Dim oBuffer = Await oCreator.CreateReport(oItems)
Dim oCreator As New ReportCreator(LogConfig, oState)
Dim oBuffer = oCreator.CreateReport(oEnvelope)
Using oStream As New IO.MemoryStream(oBuffer)
PdfViewer1.LoadDocument(oStream)