Release für ewa
This commit is contained in:
@@ -23,6 +23,8 @@ Public Class ClassDocGrid
|
||||
End Class
|
||||
|
||||
Private ReadOnly GridView As GridView
|
||||
' ✅ NEU: Flag zum Unterdrücken aller Grid-Events während Bulk-Operationen
|
||||
Public Shared Property IsBulkSelectionActive As Boolean = False
|
||||
|
||||
Public ReadOnly Property SelectedDocuments As List(Of clsWMDoc)
|
||||
Get
|
||||
@@ -66,6 +68,8 @@ Public Class ClassDocGrid
|
||||
Private Shared _checkValueChangedHandler As EventHandler
|
||||
Private Shared EnableVerboseGridLogging As Boolean = False ' PRODUKTIV: FALSE!
|
||||
Private Shared _isGridRefreshing As Boolean = False
|
||||
|
||||
|
||||
Private Shared Function Init_Table()
|
||||
Try
|
||||
Dim table As New DataTable With {
|
||||
@@ -684,11 +688,51 @@ Public Class ClassDocGrid
|
||||
End Try
|
||||
End Sub
|
||||
Public Shared Sub GVDoc_Values_FocusedRowChanged(sender As GridView, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs)
|
||||
If IsBulkSelectionActive Then Return
|
||||
|
||||
LOGGER.Debug("GVDoc_Values_FocusedRowChanged triggered...")
|
||||
Try
|
||||
ClassDocGrid.GetDocItems(sender)
|
||||
If sender.FocusedRowHandle < 0 Then Return
|
||||
|
||||
' Nur die fokussierte Zeile in DT_RESULTFILES speichern (Legacy-Kompatibilität)
|
||||
If Init_Table() Then
|
||||
Dim newRow As DataRow = DT_RESULTFILES.NewRow()
|
||||
Try
|
||||
Dim oDocID = sender.GetFocusedRowCellValue(sender.Columns("DocID"))
|
||||
SELECTED_DOC_ID = If(oDocID IsNot Nothing, CInt(oDocID), 0)
|
||||
newRow("DOC_ID") = SELECTED_DOC_ID ' ✅ DOC_ID wird gesetzt
|
||||
Catch ex As Exception
|
||||
newRow("DOC_ID") = 0
|
||||
SELECTED_DOC_ID = 0
|
||||
End Try
|
||||
Try
|
||||
SELECTED_DOC_PATH = sender.GetFocusedRowCellValue(sender.Columns("FULLPATH"))
|
||||
If IsNothing(SELECTED_DOC_PATH) Then
|
||||
SELECTED_DOC_PATH = sender.GetFocusedRowCellValue(sender.Columns("FULL_FILENAME"))
|
||||
End If
|
||||
newRow("DOC_PATH") = If(SELECTED_DOC_PATH, "")
|
||||
Catch ex As Exception
|
||||
newRow("DOC_PATH") = ""
|
||||
End Try
|
||||
Try
|
||||
newRow("OBJECTTYPE") = sender.GetFocusedRowCellValue(sender.Columns("OBJECTTYPE"))
|
||||
Catch ex As Exception
|
||||
newRow("OBJECTTYPE") = ""
|
||||
End Try
|
||||
Try
|
||||
Dim dpn = sender.GetFocusedRowCellValue(sender.Columns("Displayname"))
|
||||
newRow("DISPLAYNAME") = If(IsDBNull(dpn) OrElse dpn Is Nothing, "", dpn)
|
||||
Catch ex As Exception
|
||||
newRow("DISPLAYNAME") = ""
|
||||
End Try
|
||||
' ✅ FIX: INWORK-Spalte setzen, sonst ConstraintException beim Add
|
||||
newRow("INWORK") = False
|
||||
newRow("ACCESS_RIGHT") = 0
|
||||
DT_RESULTFILES.Rows.Add(newRow)
|
||||
DT_RESULTFILES.AcceptChanges()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Unexpected error in GVDoc_Values_FocusedRowChanged: " & ex.Message)
|
||||
MsgBox("Unexpected error in GVDoc_Values_FocusedRowChanged: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
Public Shared Sub gridView_MasterRowExpanded(sender As GridView, e As DevExpress.XtraGrid.Views.Grid.CustomMasterRowEventArgs)
|
||||
|
||||
Reference in New Issue
Block a user