This commit is contained in:
2022-01-19 11:40:31 +01:00
parent 9287630dfb
commit fcdeeb12ae
75 changed files with 6011 additions and 3577 deletions

View File

@@ -219,14 +219,16 @@ Public Class ClassWindreamDocGrid
'"FROM TBPMO_DOC_VALUES T INNER JOIN TBPMO_DOCSEARCH_RESULTLIST_CONFIG T1 ON T.CONFIG_ID = T1.GUID WHERE T1.ENTITY_ID = {0} AND T1.LANGUAGE = '{1}' AND T.RECORD_ID = {2} ORDER BY T.DocID, T1.SEQUENCE", CURRENT_ENTITY_ID, USER_LANGUAGE, RECORD_ID)
Dim DT_DETAILS As DataTable = ClassDatabase.Return_Datatable(DT_DETAILS_SQL, True)
Dim docId As Integer
Dim configId As Integer
Dim recordId As Integer
Try
' Werte für Konfigurierte Spalten aus TBPMO_DOC_VALUES auslesen und Zellenweise einfügen
For Each row As DataRow In DT_RESULT.Rows
For Each col As DataColumn In DT_RESULT.Columns
Dim colName As String = col.ColumnName
Dim docId As Integer = row.Item("DocID")
Dim configId As Integer = RESULT_CONFIG_IDS.Item(col.ColumnName)
docId = row.Item("DocID")
configId = RESULT_CONFIG_IDS.Item(col.ColumnName)
If configId <> 0 Then
Dim value As String = ""
@@ -242,7 +244,7 @@ Public Class ClassWindreamDocGrid
Next
Next
Catch ex As Exception
LOGGER.Warn("Attention: Could not load values from TBPMO_DOC_VALUES: " & ex.Message)
LOGGER.Warn($"Attention: Could not load values from TBPMO_DOC_VALUES: " & ex.Message & vbNewLine & $"SELECT VALUE FROM TBPMO_DOC_VALUES WHERE CONFIG_ID = {configId} AND DocID = {docId} AND RECORD_ID = {RECORD_ID}")
End Try
LOGGER.Debug("Values loaded...")
Try
@@ -305,10 +307,12 @@ Public Class ClassWindreamDocGrid
For Each row As DataRow In DT_WINDREAM_RESULTLIST.Rows
Dim col As GridColumn = gridView.Columns(row.Item("HEADER_CAPTION"))
Dim colCaption = row.Item("HEADER_CAPTION")
Dim type As Integer = row.Item("TYPE_ID")
Dim isConfig As Boolean = row.Item("CONFIG_COLUMNS")
If Not IsNothing(col) And type = 4 And isConfig Then
LOGGER.Debug($"Adapting DisplayFormat (DATETIME for Column {colCaption}")
col.DisplayFormat.FormatType = FormatType.DateTime
col.DisplayFormat.FormatString = CURRENT_DATE_FORMAT & " HH:MM:ss"
End If
@@ -383,7 +387,7 @@ Public Class ClassWindreamDocGrid
e.RepositoryItem = checkEdit
End If
If typeId = 4 Then
If typeId = 3 Then
Dim dateedit As New RepositoryItemDateEdit()
dateedit.DisplayFormat.FormatType = FormatType.DateTime
@@ -413,7 +417,7 @@ Public Class ClassWindreamDocGrid
e.RepositoryItem = dateedit
End If
If typeId = 3 Then
If typeId = 4 Then
Dim dropdown As New RepositoryItemComboBox()
Dim matchingRows() As DataRow = DT_DROPDOWN_ITEMS.Select(String.Format("CONFIG_ID = {0}", configId), "SEQUENCE")
@@ -445,7 +449,7 @@ Public Class ClassWindreamDocGrid
Dim parsedDate As DateTime
If Not IsNothing(DATE_COLUMNS) Then
If DATE_COLUMNS.Contains(e.Column.FieldName) And e.ListSourceRowIndex <> DevExpress.XtraGrid.GridControl.InvalidRowHandle Then
LOGGER.Debug($"gridView_CustomColumnDisplayText1 [{e.Column.FieldName}] ")
If e.Value.ToString() = String.Empty Then
e.DisplayText = ""
Exit Sub
@@ -465,7 +469,7 @@ Public Class ClassWindreamDocGrid
e.DisplayText = ""
Exit Sub
End If
LOGGER.Debug($"gridView_CustomColumnDisplayText2 [{e.Column.FieldName}] ")
If Not DateTime.TryParse(e.Value, parsedDate) Then
parsedDate = DateTime.ParseExact(e.Value, CURRENT_DATE_FORMAT, System.Globalization.DateTimeFormatInfo.InvariantInfo)
End If