add clipboard handler for all grids
This commit is contained in:
parent
ddaacfe75c
commit
cd1cdfe19a
@ -44,13 +44,7 @@ Public Class frmExportMain
|
||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
|
||||
Database = New MSSQLServer(LogConfig, oConnectionString)
|
||||
|
||||
Dim oViews As New List(Of GridView) From {
|
||||
GridViewDocuments,
|
||||
lookupMandator.Properties.View,
|
||||
lookupAccount.Properties.View
|
||||
}
|
||||
GridBuilder = New GridBuilder(oViews)
|
||||
GridBuilder.
|
||||
GridBuilder = New GridBuilder(GridViewDocuments, lookupMandator.Properties.View, lookupAccount.Properties.View).
|
||||
WithDefaults().
|
||||
WithReadOnlyOptions().
|
||||
WithClipboardHandler()
|
||||
|
||||
@ -64,8 +64,10 @@ Public Class frmImportMain
|
||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
|
||||
Database = New MSSQLServer(LogConfig, oConnectionString)
|
||||
|
||||
GridBuilder = New GridBuilder(GridViewFiles)
|
||||
GridBuilder.WithDefaults.WithReadOnlyOptions.WithClipboardHandler()
|
||||
GridBuilder = New GridBuilder(GridViewFiles, GridView1, GridView2, GridView3, GridView4).
|
||||
WithDefaults().
|
||||
WithReadOnlyOptions().
|
||||
WithClipboardHandler()
|
||||
GridViewFiles.OptionsView.ShowAutoFilterRow = False
|
||||
|
||||
Winline = My.Winline
|
||||
@ -413,7 +415,8 @@ Public Class frmImportMain
|
||||
|
||||
If oFailedDocuments.Count > 0 Then
|
||||
Dim oErrorMessages = String.Join(vbNewLine, oFailedDocuments)
|
||||
Dim oMessage = String.Format("Für {0} Dateien ist die Übertragung in die Winline fehlgeschlagen. Folgende Fehler sind aufgetreten: {2}{1}", oFailedDocuments.Count, oErrorMessages, vbNewLine)
|
||||
Dim oFailedCount = oFailedDocuments.Count
|
||||
Dim oMessage = $"Für {oFailedCount} Dateien ist die Übertragung in die Winline fehlgeschlagen. Folgende Fehler sind aufgetreten: {oErrorMessages}{vbNewLine}"
|
||||
MsgBox(oMessage, MsgBoxStyle.Exclamation, Text)
|
||||
End If
|
||||
|
||||
@ -441,8 +444,6 @@ Public Class frmImportMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Async Function btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) As Task Handles btnLoadFiles.ItemClick
|
||||
Await LoadFiles()
|
||||
End Function
|
||||
@ -753,24 +754,31 @@ Public Class frmImportMain
|
||||
Return False
|
||||
End If
|
||||
|
||||
Logger.Info("Transferring file [{0}] to Winline", pDocument.FileName)
|
||||
Dim oResult = Await WebService.TransferDocumentToWinline(pDocument, CurrentTemplate, lookupMandator.EditValue, pIsTest)
|
||||
|
||||
Logger.Debug("Transfer successful: [{0}]", oResult)
|
||||
|
||||
If oResult = True Then
|
||||
|
||||
' If this was only a test, we are done.
|
||||
If pIsTest = True Then
|
||||
Logger.Debug("This was a Test Transfer. Exiting.")
|
||||
Return True
|
||||
End If
|
||||
|
||||
' Generate the report
|
||||
WebService.RaiseWebServiceProgress("Bericht erzeugen")
|
||||
Logger.Debug("Creating report for file [{0}]", pDocument.FileName)
|
||||
Dim oReportResult = ReportGenerator.GenerateReport(pDocument, CurrentTemplate)
|
||||
|
||||
' Export it to pdf
|
||||
WebService.RaiseWebServiceProgress("Bericht exportieren")
|
||||
Logger.Debug("Exporting report to [{0}]", oReportResult.FileName)
|
||||
oReportResult.Report.ExportToPdf(oReportResult.FileName)
|
||||
|
||||
' Mark Document as Imported, will be moved on Form Close or File Reload
|
||||
Logger.Debug("Setting file [{0}] to Imported", pDocument.FileName)
|
||||
pDocument.Imported = True
|
||||
|
||||
Return True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user