Create_Basic_View

This commit is contained in:
Developer01
2026-01-30 13:02:55 +01:00
parent 969f27a91f
commit 11d27cd860

View File

@@ -1040,8 +1040,19 @@ Public Class frmMain
End Try End Try
End Function End Function
Sub Create_Basic_View() Sub Create_Basic_View()
Dim gridUpdateStarted As Boolean = False
Dim viewUpdateStarted As Boolean = False
Try Try
FRONTEND_ACTION = "Create_Basic_View" FRONTEND_ACTION = "Create_Basic_View"
If GridControlWorkflows.Visible Then
GridControlWorkflows.BeginUpdate()
gridUpdateStarted = True
GridViewWorkflows.BeginUpdate()
viewUpdateStarted = True
End If
GridControlWorkflows.DataSource = Nothing GridControlWorkflows.DataSource = Nothing
Try Try
GridViewWorkflows.Columns.Clear() GridViewWorkflows.Columns.Clear()
@@ -1049,20 +1060,20 @@ Public Class frmMain
LOGGER.Error(ex) LOGGER.Error(ex)
LOGGER.Warn("Could not clear GridViewWorkflows.Columns") LOGGER.Warn("Could not clear GridViewWorkflows.Columns")
End Try End Try
If TL_ICON = True Then
' Spalte für Status Icon erstellen If TL_ICON = True AndAlso DT_CURR_WF_ITEMS IsNot Nothing AndAlso DT_CURR_WF_ITEMS.Columns.Contains("ICON") = False Then
Dim columnStateIcon As New DataColumn() Dim columnStateIcon As New DataColumn() With {
columnStateIcon.DataType = GetType(Image) .DataType = GetType(Image),
columnStateIcon.ColumnName = "ICON" .ColumnName = "ICON",
columnStateIcon.Caption = "" .Caption = ""
}
DT_CURR_WF_ITEMS.Columns.Add(columnStateIcon) DT_CURR_WF_ITEMS.Columns.Add(columnStateIcon)
End If End If
RedDocuments = 0 RedDocuments = 0
YellowDocuments = 0 YellowDocuments = 0
GreenDocuments = 0 GreenDocuments = 0
If TL_ICON = True Then If TL_ICON = True AndAlso DT_CURR_WF_ITEMS IsNot Nothing Then
For Each row As DataRow In DT_CURR_WF_ITEMS.Rows For Each row As DataRow In DT_CURR_WF_ITEMS.Rows
Dim State As Integer = row.Item("TL_STATE") Dim State As Integer = row.Item("TL_STATE")
Select Case State Select Case State
@@ -1079,94 +1090,31 @@ Public Class frmMain
Next Next
End If End If
'If IDB_ACTIVE = True Then
' ' Spalte für Conversation erstellen
' Dim columnConvIcon As New DataColumn()
' columnConvIcon.DataType = GetType(Image)
' columnConvIcon.ColumnName = "CONVERSATION"
' columnConvIcon.Caption = ""
' DT_CURR_WF_ITEMS.Columns.Add(columnConvIcon)
'End If
'For Each oRow As DataRow In DT_CURR_WF_ITEMS.Rows
' Try
' Dim oCONVYN As Boolean
' Try
' oCONVYN = oRow.Item("CONV_YN")
' Catch ex As Exception
' LOGGER.Warn($"Please check Your select/view Config - Column CONV_YN is missing [{ex.Message}]")
' Exit For
' End Try
' Select Case oCONVYN
' Case True
' oRow.Item("CONVERSATION") = My.Resources.conversation
' End Select
' Catch ex As Exception
' LOGGER.Warn("Create_Basic_View1 - Column CONVERSATION obviously is not part of GridViewWorkflows")
' End Try
'Next
bindsourcegrid.DataSource = DT_CURR_WF_ITEMS bindsourcegrid.DataSource = DT_CURR_WF_ITEMS
GridControlWorkflows.DataSource = bindsourcegrid GridControlWorkflows.DataSource = bindsourcegrid
Dim objectCount_Descr = GridViewWorkflows.RowCount.ToString
'Dim ocapt = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("DescItems")
Dim ocapt = String.Format(S._0__Vorgänge, objectCount_Descr)
objectCount_Descr = $"{objectCount_Descr} {ocapt}"
'tslblObjectCount.Text = objectCount_Descr
'GridControlDocRow.ForceInitialize()
RestoreLayout() RestoreLayout()
COLUMNS_INVISIBLE() COLUMNS_INVISIBLE()
Try Try
If TL_ICON = True Then If TL_ICON = True AndAlso GridViewWorkflows.Columns.Count > 0 Then
GridViewWorkflows.Columns.Item("ICON").MaxWidth = 24 GridViewWorkflows.Columns.Item("ICON").MaxWidth = 24
GridViewWorkflows.Columns.Item("ICON").MinWidth = 24 GridViewWorkflows.Columns.Item("ICON").MinWidth = 24
GridViewWorkflows.Columns.Item("ICON").AppearanceCell.BackColor = Color.White GridViewWorkflows.Columns.Item("ICON").AppearanceCell.BackColor = Color.White
GridViewWorkflows.Columns.Item("ICON").Fixed = FixedStyle.Left GridViewWorkflows.Columns.Item("ICON").Fixed = FixedStyle.Left
End If End If
Catch ex As Exception Catch ex As Exception
End Try End Try
'If IDB_ACTIVE = True Then
' Try
' GridViewWorkflows.Columns.Item("CONVERSATION").MaxWidth = 24
' GridViewWorkflows.Columns.Item("CONVERSATION").MinWidth = 24
' GridViewWorkflows.Columns.Item("CONVERSATION").Fixed = FixedStyle.Left
' Catch ex As Exception
' LOGGER.Info("Create_Basic_View2 - Column CONVERSATION obviously is not part of GridViewWorkflows - Trying to Rest Layout")
' ResetLayout()
' FRONTEND_ACTION = FA_NONE
' Exit Sub
' End Try
'End If
' GridViewWorkflows.OptionsView.ShowIndicator = False
Try Try
Dim oReducedColName = LAST_EDITED_COLUMN.Replace("[", "") Dim oReducedColName = LAST_EDITED_COLUMN.Replace("[", "").Replace("]", "")
oReducedColName = oReducedColName.Replace("]", "")
'GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatType = FormatType.DateTime
'GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex As Exception Catch ex As Exception
Try Try
'GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatType = FormatType.DateTime
'GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex1 As Exception Catch ex1 As Exception
LOGGER.Warn("(CreateBasicView)Column [Last edited] or [Zuletzt bearbeitet] not part of OverviewSQL") LOGGER.Warn("(CreateBasicView)Column [Last edited] or [Zuletzt bearbeitet] not part of OverviewSQL")
End Try End Try
End Try End Try
LOGGER.Debug("All columns in CreateBasicView created")
Try Try
GridViewWorkflows.Columns.Item("GROUP_TEXT").Visible = False GridViewWorkflows.Columns.Item("GROUP_TEXT").Visible = False
GridViewWorkflows.Columns.Item("GROUP_COLOR").Visible = False GridViewWorkflows.Columns.Item("GROUP_COLOR").Visible = False
@@ -1174,13 +1122,19 @@ Public Class frmMain
If OverviewOrDEtail = "OVERVIEW" Then If OverviewOrDEtail = "OVERVIEW" Then
LOGGER.Warn("ATTENTION: GROUP COLUMNS NOT PART OF GRID") LOGGER.Warn("ATTENTION: GROUP COLUMNS NOT PART OF GRID")
End If End If
End Try End Try
LOGGER.Debug("All columns in CreateBasicView created")
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex) LOGGER.Error(ex)
End Try Finally
If viewUpdateStarted Then
GridViewWorkflows.EndUpdate()
End If
If gridUpdateStarted Then
GridControlWorkflows.EndUpdate()
End If
FRONTEND_ACTION = FA_NONE FRONTEND_ACTION = FA_NONE
End Try
End Sub End Sub
Private Function GridLayoutChanged() As Boolean Private Function GridLayoutChanged() As Boolean
Try Try