Update Report, Fix Paths issues, Small Tweaks, Work on Exports

This commit is contained in:
Jonathan Jenne
2021-12-23 15:58:45 +01:00
parent 79cfec3173
commit 4859406fe3
22 changed files with 495 additions and 243 deletions

View File

@@ -410,23 +410,28 @@ Public Class frmImportMain
End If
' Transfer to winline
Await WebService.TransferDocumentToWinline(oDocument, CurrentTemplate, lookupMandator.EditValue)
Dim oTransferResult = Await WebService.TransferDocumentToWinline(oDocument, CurrentTemplate, lookupMandator.EditValue)
WebService.RaiseWebServiceProgress("Bericht erzeugen")
If oTransferResult = True Then
' Generate the report
Dim oReport = ReportGenerator.GenerateReport(oDocument)
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate)
WebService.RaiseWebServiceProgress("Bericht erzeugen")
WebService.RaiseWebServiceProgress("Bericht exportieren")
' Generate the report
Dim oReport = ReportGenerator.GenerateReport(oDocument)
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate)
' Export it to pdf
oReport.ExportToPdf(oFilePath)
WebService.RaiseWebServiceProgress("Bericht exportieren")
' Mark Document as Imported
oDocument.Imported = True
' Export it to pdf
oReport.ExportToPdf(oFilePath)
MsgBox(My.Resources.frmImportMainExtra.Datei_erfolgreich_in_die_WinLine_übertragen, MsgBoxStyle.Information, Text)
WebService.RaiseWebServiceProgress("Datei archivieren")
' Mark Document as Imported, will be moved on Form Close
oDocument.Imported = True
End If
'MsgBox(My.Resources.frmImportMainExtra.Datei_erfolgreich_in_die_WinLine_übertragen, MsgBoxStyle.Information, Text)
Catch ex As HttpRequestException
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Übertragung_zur_WinLine, My.Resources.frmImportMainExtra.Die_Verbindung_zum_WinLine_Server_ist_fehlgeschlagen)
@@ -616,4 +621,16 @@ Public Class frmImportMain
SplashScreenManager.CloseWaitForm()
End Try
End Sub
Private Sub btnDebugExportReport_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDebugExportReport.ItemClick
' Get the document
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
' Generate the report
Dim oReport = ReportGenerator.GenerateReport(oDocument)
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate)
' Export it to pdf
oReport.ExportToPdf(oFilePath)
End Sub
End Class