Bugfixing und Verbesserungen NodeBNavigation

This commit is contained in:
Developer01
2025-09-10 15:28:57 +02:00
parent e62741c0ac
commit 0d64b5e887
10 changed files with 592 additions and 491 deletions

View File

@@ -1,15 +1,12 @@
Imports System.IO
'Imports System.Text
'Imports DD_LIB_Standards
Imports DevExpress.XtraGrid.Columns
Public Class frmDocRecordLink
Public Property myDocuments As New List(Of ClassDocGrid.clsWMDoc)
Private CURRENT_LINK_ENTITY_ID As Integer = 0
Private ENTITY_LOAD_ACTIVE As Boolean = False
Private DT_ENTITYDATA As DataTable
Private Class ClassEntity
Public title As String
Public id As Integer
@@ -32,12 +29,12 @@ Public Class frmDocRecordLink
If CURRENT_LINK_ENTITY_ID = 0 Then
CURRENT_LINK_ENTITY_ID = CURRENT_ENTITY_ID
End If
Try
' DT_RECORDS.Columns.Add("already linked", Type.GetType("System.Boolean")).SetOrdinal(0)
' DT_RECORDS.Columns("already linked").DefaultValue = False
Catch ex As Exception
'Try
' DT_RECORDS.Columns.Add("already linked", Type.GetType("System.Boolean")).SetOrdinal(0)
' DT_RECORDS.Columns("already linked").DefaultValue = False
'Catch ex As Exception
End Try
'End Try
'Try
' For Each row As DataRow In CURRENT_DT_SELECTED_FILES.Rows
@@ -232,7 +229,7 @@ Public Class frmDocRecordLink
Try
Dim XMLPath = Get_DocGrid_Layout_Filename()
grvwGrid.SaveLayoutToXml(XMLPath)
bsiInfo.Caption = "Grid-Layout saved - " + Now.ToShortTimeString
bsiInfo.Caption = "Grid-Layout saved - " + Now.ToLongTimeString
Catch ex As Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Save_DocGrid_Layout", ex.Message, ex.StackTrace)
@@ -244,7 +241,7 @@ Public Class frmDocRecordLink
If File.Exists(XMLPath) Then
grvwGrid.RestoreLayoutFromXml(XMLPath)
grvwGrid.GuessAutoFilterRowValuesFromFilter()
bsiInfo.Caption = "Grid-Layout loaded - " + Now.ToShortTimeString
bsiInfo.Caption = "Grid-Layout loaded - " + Now.ToLongTimeString
End If
Catch ex As Exception
@@ -264,11 +261,14 @@ Public Class frmDocRecordLink
Me.Cursor = Cursors.WaitCursor
If cmbConstructorForms.SelectedIndex <> -1 Then
ENTITY_LOAD_ACTIVE = True
Save_DocGrid_Layout()
dgEntityRecords.DataSource = Nothing
grvwGrid.Columns.Clear()
Dim DT_RESULT = ReturnDataforEntity(entity.id)
If Not IsNothing(DT_RESULT) Then
CURRENT_LINK_ENTITY_ID = entity.id
txtcurrSichtData.Text = entity.title
DT_ENTITYDATA = DT_RESULT
Refresh_Grid_Data(False, DT_RESULT)
End If
Load_DocGrid_Layout()
@@ -282,9 +282,10 @@ Public Class frmDocRecordLink
Dim ResultSQL, ResultViewName As String
LOGGER.Debug("GridType = Grid")
ResultViewName = $"VWPMO_ENTITY_TABLE{oEntityID}"
bsitmSource.Caption = $"Source: " + ResultViewName
ResultSQL = $"SELECT T.* FROM {ResultViewName} T"
LOGGER.Debug("ResultSQL: " & ResultSQL)
Return MYDB_ECM.GetDatatable(ResultSQL)
End Function
@@ -340,7 +341,8 @@ Public Class frmDocRecordLink
omsg = $"[{oLinkCount}] records successfully linked - {Now.ToShortTimeString}"
End If
MsgBox(omsg, MsgBoxStyle.Information, "orgFLOW")
Refresh_Grid_Data(True, Nothing)
Refresh_Grid_Data(False, DT_ENTITYDATA)
Load_DocGrid_Layout()
grvwGrid.ClearSelection()
End Sub
@@ -370,7 +372,7 @@ Public Class frmDocRecordLink
End Sub
Private Sub grvwGrid_StyleChanged(sender As Object, e As EventArgs) Handles grvwGrid.ColumnPositionChanged, grvwGrid.ColumnWidthChanged
If ENTITY_LOAD_ACTIVE = False Then
If ENTITY_LOAD_ACTIVE = True Then
Save_DocGrid_Layout()
End If
End Sub