Support Link wird aus der DB geholt und ist nicht mehr hardcoded - frmKonfig

This commit is contained in:
OlgunR
2025-05-15 17:03:36 +02:00
parent 89313eb0b6
commit 0cca734cd0
7 changed files with 203 additions and 81 deletions

View File

@@ -18,6 +18,7 @@ Imports DevExpress.XtraBars.Ribbon
Imports DigitalData.Modules.ZooFlow
Imports DevExpress.LookAndFeel
Imports DigitalData.Modules.Base
Imports DevExpress.XtraGrid.Views.Base
Public Class frmMain
Private Property FormHelper As FormHelper
@@ -753,13 +754,13 @@ Public Class frmMain
Try
oReducedColName = LAST_EDITED_COLUMN.Replace("[", "")
oReducedColName = oReducedColName.Replace("]", "")
GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatType = FormatType.DateTime
GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatType = FormatType.DateTime
'GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex As Exception
Try
If oReducedColName <> "Zuletzt bearbeitet" Then
GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatType = FormatType.DateTime
GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatType = FormatType.DateTime
'GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
End If
Catch ex1 As Exception
LOGGER.Warn($"(ResetLayout)Column [{oReducedColName}] or [Zuletzt bearbeitet] not part of OverviewSQL")
@@ -1145,12 +1146,12 @@ Public Class frmMain
Try
Dim oReducedColName = LAST_EDITED_COLUMN.Replace("[", "")
oReducedColName = oReducedColName.Replace("]", "")
GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatType = FormatType.DateTime
GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatType = FormatType.DateTime
'GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex As Exception
Try
GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatType = FormatType.DateTime
GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatType = FormatType.DateTime
'GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex1 As Exception
LOGGER.Warn("(CreateBasicView)Column [Last edited] or [Zuletzt bearbeitet] not part of OverviewSQL")
End Try
@@ -2117,13 +2118,13 @@ Public Class frmMain
Try
Dim oReducedColName = LAST_EDITED_COLUMN.Replace("[", "")
oReducedColName = oReducedColName.Replace("]", "")
If Not IsNothing(GridViewWorkflows.Columns(oReducedColName)) Then
GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatType = FormatType.DateTime
GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
ElseIf Not IsNothing(GridViewWorkflows.Columns("Zuletzt bearbeitet")) Then
GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatType = FormatType.DateTime
GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
End If
'If Not IsNothing(GridViewWorkflows.Columns(oReducedColName)) Then
' GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatType = FormatType.DateTime
' GridViewWorkflows.Columns(oReducedColName).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'ElseIf Not IsNothing(GridViewWorkflows.Columns("Zuletzt bearbeitet")) Then
' GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatType = FormatType.DateTime
' GridViewWorkflows.Columns("Zuletzt bearbeitet").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'End If
Catch ex As Exception
LOGGER.Warn("(Warning LoadGridOverview)Column [Last edited] or [Zuletzt bearbeitet] not part of OverviewSQL")
@@ -2155,6 +2156,62 @@ Public Class frmMain
End Try
End If
RestoreLayout()
'Dim oSQl = "SELECT * FROM TBDD_COLUMNS_FORMAT where MODULE = 'taskFLOW'"
'Dim DTColumsFormat As DataTable = DatabaseFallback.GetDatatable("TBDD_COLUMNS_FORMAT", New GetDatatableOptions(oSQl, DatabaseType.ECM))
'For Each oColumn As Columns.GridColumn In GridViewWorkflows.Columns
' For Each oRow As DataRow In DTColumsFormat.Rows
' Dim oColumnName = oColumn.FieldName
' If oColumnName = oRow.Item("COLUMN_TITLE").ToString Then
' Dim oFormat = oRow.Item("TYPE2FORMAT").ToString
' If oFormat = "DateTime" Then
' If DT_CURR_WF_ITEMS.Columns.Contains(oColumnName) Then
' Dim oColumnType = DT_CURR_WF_ITEMS.Columns(oColumnName).DataType
' If oColumnType IsNot GetType(DateTime) Then
' Continue For
' End If
' End If
' If oColumn.DisplayFormat.FormatType <> FormatType.DateTime Then
' oColumn.DisplayFormat.FormatType = FormatType.DateTime
' oColumn.DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
' End If
' End If
' End If
' Next
'Next
'For Each oColumn As Columns.GridColumn In GridViewWorkflows.Columns
' If DT_CURR_WF_ITEMS.Columns.Contains(oColumn.FieldName) Then
' Dim dtColumn As DataColumn = DT_CURR_WF_ITEMS.Columns(oColumn.FieldName)
' If dtColumn.DataType Is GetType(String) Then
' For Each row As DataRow In DT_CURR_WF_ITEMS.Rows
' Dim cellValue = row(oColumn.FieldName).ToString()
' Dim dateValue As DateTime
' If DateTime.TryParse(cellValue, dateValue) Then
' row(oColumn.FieldName) = dateValue
' End If
' Next
' dtColumn.DataType = GetType(DateTime)
' oColumn.DisplayFormat.FormatType = FormatType.DateTime
' oColumn.DisplayFormat.FormatString = "dd.MM.yyyy HH:mm:ss"
' End If
' End If
'Next
oStopWatch.Done()
Catch ex As Exception
LOGGER.Error(ex)