Monitor: Datumsspalten im langen Format / UserID des aktuellen Users kann verwendet werden / Speicheroptimierte Abfragen ohne Transaktion

This commit is contained in:
2026-03-06 12:26:18 +01:00
parent 6912f290cd
commit fca7d1e0ff
4 changed files with 63 additions and 12 deletions

View File

@@ -240,7 +240,14 @@ Public Class frmMonitor
If oSearch.SQLCommand.Length > 0 Then
oSQL = Patterns.ReplaceControlValues(oSearch.SQLCommand, oControls)
Logger.Debug($"SQL after replacing placeholder: [{0}]", oSQL)
oTable = Await Database.GetDatatableAsync(oSQL)
If oSearch.UseMOTLogic = True Then
' MOT-Abfragen müssen OHNE Transaktion aufgerufen werden
oTable = Await Database.GetDatatableWithoutTransactionAsync(oSQL)
Else
' sonstige Abfragen wie bisher mit Transaktion
oTable = Await Database.GetDatatableAsync(oSQL)
End If
End If
Dim oStartTime = Now
@@ -271,7 +278,7 @@ Public Class frmMonitor
For Each oColumn In TreeListResults.Columns
oColumn.Visible = DisplayColumns.Contains(oColumn.FieldName)
Next
GridBuilder.SetDateTimeColumns(TreeListResults)
GridBuilder.SetDateTimeColumns(TreeListResults, "G")
Dim oStateColumn As TreeListColumn = TreeListResults.Columns.Item("STATE")
For Each oNode As TreeListNode In TreeListResults.Nodes
@@ -357,7 +364,7 @@ Public Class frmMonitor
GridControlResults.DataSource = oTable
GridViewResults.PopulateColumns()
GridBuilder.SetDateTimeColumns(GridViewResults)
GridBuilder.SetDateTimeColumns(GridViewResults, "G")
For Each oColumn As GridColumn In GridViewResults.Columns
If oColumn.ColumnType = GetType(Integer) Then
@@ -1040,6 +1047,8 @@ Public Class frmMonitor
GridControl.DataSource = Table
GridControl.DefaultView.PopulateColumns()
'Hiermit wird das Datumsformat für Untertabellen auf lang gesetzt
GridBuilder.SetDateTimeColumns(GridControl.DefaultView, "G")
Dim oTabPage = DirectCast(GridControl.Parent, XtraTabPage)
oTabPage.PageVisible = True