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

@@ -81,7 +81,7 @@ Public Class frmNodeNavigation
Private Property ChildNodeGuid As Integer = 0
Private Property ClassNodeCommands As ClassNodeCommands
Private Property ViewerInit As Boolean = False
Private Property DocViewInitialized As Boolean = False
Private PA_NODE_GUID_STAMM As Integer = 0
Private PA_NODE_CONFIG_USER_STAMM As Integer = 0
@@ -121,8 +121,7 @@ Public Class frmNodeNavigation
CONFIG.Config.TreeListSplitterWidth = SplitContainerTreeList.SplitterPosition
CONFIG.Config.DocumentViewerSplitterWidth = SplitContainerDocView.SplitterPosition
CONFIG.Config.DocumentSearchSplitterWidth = SplitContainerDocumentSearch.SplitterPosition
CONFIG.Config.DocumentViewerShown = Not SplitContainerDocView.Collapsed
CONFIG.Save()
Catch ex As Exception
NNLogger.Error(ex)
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace)
@@ -142,7 +141,7 @@ Public Class frmNodeNavigation
If CONFIG.Config.DocumentSearchSplitterWidth > 0 Then
SplitContainerDocumentSearch.SplitterPosition = CONFIG.Config.DocumentSearchSplitterWidth
End If
If ViewerInit Then
If DocViewInitialized Then
SplitContainerDocView.Collapsed = Not CONFIG.Config.DocumentViewerShown
Else
SplitContainerDocView.Collapsed = True
@@ -178,7 +177,7 @@ Public Class frmNodeNavigation
SplitContainerDocView.Collapsed = True
DocumentViewer.Visible = False
Else
ViewerInit = True
DocViewInitialized = True
End If
Catch ex As Exception
NNLogger.Warn($"Error while init DocumentViewer: {ex.Message}")
@@ -367,6 +366,9 @@ Public Class frmNodeNavigation
Dim oParentNode = e.Node.ParentNode
Dim oLoadRecordData As Boolean = True
NodeGroupEnable(True)
Record_Group_Enable(False)
If ENTITY_TYPE = "Personal file" And oNodeConfigId <> PA_NODE_CONFIG_USER_STAMM Then
oLoadRecordData = False
End If
@@ -424,7 +426,7 @@ Public Class frmNodeNavigation
Await Show_Selected_Record_Data(CURRENT_RECORD_ID, oLoadRecordData)
Show_SelectedDoc(True)
DocView_DisplaySelectedDoc(True)
ClassRightManagement.Check_Set_Rights(CURRENT_RECORD_ID, _EntityId)
CONTROL_HANDLING()
@@ -434,7 +436,6 @@ Public Class frmNodeNavigation
bbtnitmRecSave.Enabled = False
Else
bbtnitmRecEdit.Enabled = True
In_Visible_Record_Group(True)
End If
End If
@@ -444,8 +445,9 @@ Public Class frmNodeNavigation
bbtnitmRecSave.Enabled = False
btnCreateNewNode.Enabled = False
Else
bbtnitmRecEdit.Enabled = True
In_Visible_Record_Group(True)
Record_Group_Enable(True)
' btnCreateNewNode.Enabled = True
End If
@@ -591,8 +593,8 @@ Public Class frmNodeNavigation
bsiInfo.ItemAppearance.Normal.BackColor = Color.LightGray
End Select
End Sub
Public Sub Update_Notification_Label(visible As Boolean, pMessage As String, pColor As String)
bsiNotification.Caption = pMessage
Public Async Sub Update_Notification_Label(visible As Boolean, pMessage As String, pColor As String)
bsiNotification.Caption = pMessage + $" - {Now.ToLongTimeString}"
If visible = True Then
bsiNotification.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
Else
@@ -605,6 +607,8 @@ Public Class frmNodeNavigation
bsiNotification.ItemAppearance.Normal.BackColor = Color.Yellow
Case "Blue"
bsiNotification.ItemAppearance.Normal.BackColor = Color.LightBlue
Case "Lime"
bsiNotification.ItemAppearance.Normal.BackColor = Color.LimeGreen
Case Else
bsiNotification.ItemAppearance.Normal.BackColor = Color.Transparent
End Select
@@ -615,6 +619,7 @@ Public Class frmNodeNavigation
bsiDocID.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
Else
bsiDocID.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
Exit Sub
End If
@@ -966,14 +971,14 @@ Public Class frmNodeNavigation
Dim oDocumentsFound = Await RUN_DOCSEARCH(True)
If ViewerInit Then
If DocViewInitialized Then
If oDocumentsFound = 0 Then
Close_Document_Viewer()
RibbonPageGroupDocResult.Enabled = False
SplitContainerDocView.Collapsed = True
Else
RibbonPageGroupDocResult.Enabled = True
SplitContainerDocView.Collapsed = False
SplitContainerDocView.Collapsed = Not CONFIG.Config.DocumentViewerShown
End If
End If
@@ -1199,7 +1204,6 @@ Public Class frmNodeNavigation
Private Sub TreeListDevexpress_ParseFindPanelText(sender As Object, e As ParseFindPanelTextEventArgs) Handles TreeListDevexpress.ParseFindPanelText
' Exit if the search text is empty
If String.IsNullOrWhiteSpace(e.FindPanelText) Then
Return
End If
@@ -1331,21 +1335,35 @@ Public Class frmNodeNavigation
End Sub
Private Sub pnlControls_Enter(sender As Object, e As EventArgs) Handles pnlControls.Enter
In_Visible_Record_Group(True)
Record_Group_Enable(True)
NodeGroupEnable(False)
End Sub
Private Sub pnlControls_Leave(sender As Object, e As EventArgs) Handles pnlControls.Leave
In_Visible_Record_Group(False)
If RECORD_ENABLED = True Then
If TrySave_Automatic() = True Then
DisableEditMode()
End If
Else
Record_Group_Enable(False)
End If
End Sub
Private Sub GridControlDocSearch_MouseDown(sender As Object, e As MouseEventArgs) Handles GridControlDocSearch.MouseDown
In_Visible_Record_Group(False)
Record_Group_Enable(False)
NodeGroupEnable(False)
End Sub
Sub In_Visible_Record_Group(oBool As Boolean)
RibbonPageGroupRecord.Visible = oBool
Sub Record_Group_Enable(oBool As Boolean)
RibbonPageGroupRecord.Enabled = oBool
If oBool = True Then
bbtnitmRecSave.Enabled = False
End If
End Sub
Sub NodeGroupEnable(pBool As Boolean)
RPGNodes.Enabled = pBool
End Sub
Private Sub bbtnitmEditRec_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmRecEdit.ItemClick
@@ -1756,6 +1774,7 @@ Public Class frmNodeNavigation
Finally
sw.Done()
bsitmtInfoDoc.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
Update_Notification_Label(False, "", "")
If pShowSplashscreen Then
SplashScreenManager.CloseOverlayForm(oHandle)
End If
@@ -1810,15 +1829,10 @@ Public Class frmNodeNavigation
End Sub
Private Sub OnCBSelectedValueChanged(sender As Object, e As EventArgs)
Try
Dim oDocuments = Current_DocList.SelectedDocuments
Dim docId As Integer = oDocuments.First.DocId
If docId = 0 Then
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
Dim oDocID = Focused_Row_GetDocID()
If oDocID = 0 Then
Exit Sub
End If
Dim ComboBox As ComboBoxEdit = sender
'Dim ItemComboBox As RepositoryItemComboBox
'ItemComboBox = sender
@@ -1829,11 +1843,20 @@ Public Class frmNodeNavigation
End If
Dim configId As Integer = item.ConfigID
Dim mainView As GridView = GridControlDocSearch.MainView
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
'Dim configid = detailRow.Item("CONFIG_ID")
Dim oHeader = detailRow.Item("HEADER_CAPTION")
Dim user As String = USER_USERNAME
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2}, '{3}', '{4}'", docId, SELECTED_NODE_RECORD_ID, configId, value, user)
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2}, '{3}', '{4}'", oDocID, SELECTED_NODE_RECORD_ID, configId, value, user)
If MYDB_ECM.ExecuteNonQuery(Sql) = False Then
MsgBox("The Update-Command was not successful! Check the log!",, MsgBoxStyle.Critical)
Else
RefreshDocValueinDatagrid(oDocID, oHeader, value)
End If
Catch ex As Exception
@@ -1844,7 +1867,10 @@ Public Class frmNodeNavigation
Private Sub OnDateSelectedValueChanged(sender As Object, e As EventArgs)
Try
Dim oDocuments = Current_DocList.SelectedDocuments
Dim oDocID = Focused_Row_GetDocID()
If oDocID = 0 Then
Exit Sub
End If
Dim DatePicker As DateEdit = sender
Dim value As DateTime = DatePicker.EditValue
@@ -1857,7 +1883,6 @@ Public Class frmNodeNavigation
NNLogger.Error(ex)
oldValue = Date.MinValue
End Try
If Not validDate Then
oldValue = Date.MinValue
End If
@@ -1872,18 +1897,15 @@ Public Class frmNodeNavigation
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
Dim configid = detailRow.Item("CONFIG_ID")
Dim oHeader = detailRow.Item("HEADER_CAPTION")
Dim docId As Integer = oDocuments.First.DocId
If docId = 0 Then
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
Exit Sub
End If
Dim user As String = USER_USERNAME
Dim dateString = value.ToString("yyyy-MM-dd") 'hh:mm:ss.fff
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2}, '{3}', '{4}'", docId, SELECTED_NODE_RECORD_ID, configid, dateString, user)
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2}, '{3}', '{4}'", oDocID, SELECTED_NODE_RECORD_ID, configid, dateString, USER_USERNAME)
If MYDB_ECM.ExecuteNonQuery(Sql) = False Then
ClassHelper.MSGBOX_Handler("ERROR", "UnexpectedError:", "Error updating doc-metadata (date): " & vbNewLine & "Check the log for further information!")
Else
RefreshDocValueinDatagrid(oDocID, oHeader, value)
End If
Catch ex As Exception
NNLogger.Error(ex)
@@ -1893,21 +1915,12 @@ Public Class frmNodeNavigation
Private Sub OnTextSelectedValueChanged(sender As Object, e As EventArgs)
Try
Dim oDocuments = Current_DocList.SelectedDocuments
If oDocuments.Count = 0 Then
Dim oDocID = Focused_Row_GetDocID()
If oDocID = 0 Then
Exit Sub
End If
Dim TextBox As TextEdit = sender
Dim value = TextBox.EditValue
Try
Dim oDocID As Integer = oDocuments.First.DocId
Catch ex As Exception
NNLogger.Info($"Error while gettin oDocuments.First.DocId - OnTextSelectedValueChanged: {ex.Message}")
Exit Sub
End Try
If value.ToUpper = "Not displayable in Group-Search".ToUpper Or IsNothing(oDocuments) Then
Exit Sub
End If
'Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
'Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
@@ -1916,24 +1929,14 @@ Public Class frmNodeNavigation
If Not IsNothing(mainView) Then
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
Dim docId As Integer
Dim configid = detailRow.Item("CONFIG_ID")
Try
docId = oDocuments.First.DocId
If docId = 0 Then
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
Exit Sub
End If
Catch ex As Exception
NNLogger.Debug($"Error while gettin oDocuments.First.DocId - OnTextSelectedValueChanged: {ex.Message}")
Exit Sub
End Try
Dim oHeader = detailRow.Item("HEADER_CAPTION")
Dim user As String = USER_USERNAME
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2},'{3}','{4}'", docId, SELECTED_NODE_RECORD_ID, configid, value, user)
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2},'{3}','{4}'", oDocID, SELECTED_NODE_RECORD_ID, configid, value, USER_USERNAME)
If MYDB_ECM.ExecuteNonQuery(Sql) = False Then
ClassHelper.MSGBOX_Handler("ERROR", "UnexpectedError:", "Error updating doc-metadata (textbox): " & vbNewLine & "Check the log for further information!")
Else
RefreshDocValueinDatagrid(oDocID, oHeader, value)
End If
End If
@@ -1946,7 +1949,10 @@ Public Class frmNodeNavigation
Private Sub OnCheckboxValueChanged(sender As Object, e As EventArgs)
'TODO Save Checkboxvalue
Try
Dim oDocuments = Current_DocList.SelectedDocuments
Dim oDocID = Focused_Row_GetDocID()
If oDocID = 0 Then
Exit Sub
End If
Dim CheckBox As CheckEdit = sender
Dim value As Boolean = CheckBox.EditValue
@@ -1955,17 +1961,14 @@ Public Class frmNodeNavigation
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
Dim configid = detailRow.Item("CONFIG_ID")
Dim oHeader = detailRow.Item("HEADER_CAPTION")
Dim docId As Integer = oDocuments.First.DocId
If docId = 0 Then
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
Exit Sub
End If
Dim user As String = USER_USERNAME
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2},'{3}','{4}'", docId, SELECTED_NODE_RECORD_ID, configid, value, user)
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE_UPD_INS {0}, {1}, {2},'{3}','{4}'", oDocID, SELECTED_NODE_RECORD_ID, configid, value, USER_USERNAME)
If MYDB_ECM.ExecuteNonQuery(Sql) = False Then
ClassHelper.MSGBOX_Handler("ERROR", "UnexpectedError:", "Error updating doc-metadata (checkbox): " & vbNewLine & "Check the log for further information!")
Else
RefreshDocValueinDatagrid(oDocID, oHeader, value)
End If
Catch ex As Exception
NNLogger.Error(ex)
@@ -1976,49 +1979,65 @@ Public Class frmNodeNavigation
Private Sub GridViewDoc_Search_LayoutSave(sender As Object, e As EventArgs) Handles GridViewDoc_Search.ColumnFilterChanged, GridViewDoc_Search.ColumnWidthChanged, GridViewDoc_Search.ColumnPositionChanged
Save_DocGrid_Layout()
End Sub
Private Sub RefreshDocValueinDatagrid(pDocID As Integer, pHeader As String, pValue As String)
Try
Dim oDatatable As DataTable = TryCast(GridControlDocSearch.DataSource, DataTable)
For Each ORow As DataRow In oDatatable.Rows
If ORow.Item("DocID") = pDocID Then
ORow.Item(pHeader) = pValue
Update_Notification_Label(True, $"Document value {pHeader} saved", "Lime")
Exit For
End If
Next
Catch ex As Exception
Private Sub GridViewDoc_Search_FocusedColumnChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedColumnChangedEventArgs) Handles GridViewDoc_Search.FocusedColumnChanged
If FORM_SHOWN = True Then
Refresh_DocID()
End If
End Try
End Sub
Private Sub GridViewDoc_Search_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridViewDoc_Search.FocusedRowChanged
Refresh_DocID()
Focused_Row_GetDocID()
End Sub
Private Sub GridViewDoc_Search_MasterRowExpanding(sender As Object, e As MasterRowCanExpandEventArgs) Handles GridViewDoc_Search.MasterRowExpanding
Refresh_DocID()
End Sub
Private Function Focused_Row_GetDocID() As Int64
Try
If FORM_SHOWN = False Then
Return 0
End If
Update_DocID_Label(False)
Update_Notification_Label(False, "", "")
If GridViewDoc_Search.FocusedRowHandle >= 0 Then
Dim oDocID = GridViewDoc_Search.GetRowCellValue(GridViewDoc_Search.FocusedRowHandle, "DocID")
If Not IsNothing(oDocID) Then
Dim omsg = "Doc-ID: " & oDocID
Update_DocID_Label(True, omsg, EditState.Update)
If SELECTED_DOC_ID <> oDocID Then
SELECTED_DOC_ID = oDocID
DocView_DisplaySelectedDoc(False)
End If
Update_DocID_Label(True, omsg, EditState.Update)
Return SELECTED_DOC_ID
Else
Update_DocID_Label(True, "DocRow not selected", EditState.None)
Return 0
End If
Else
Return 0
End If
Catch ex As Exception
Return 0
End Try
End Function
Private Sub GridViewDoc_Search_MasterRowExpanded(sender As Object, e As CustomMasterRowEventArgs) Handles GridViewDoc_Search.MasterRowExpanded
Refresh_DocID()
Focused_Row_GetDocID()
End Sub
Sub Refresh_DocID()
Dim oDocuments = Current_DocList.SelectedDocuments
If Not IsNothing(oDocuments) Then
If oDocuments.Count <> 0 Then
Dim omsg = "Doc-ID: " & oDocuments.First.DocId
Update_DocID_Label(True, omsg, EditState.Update)
Else
Update_DocID_Label(True, "DocRow not selected", EditState.None)
End If
Else
Update_DocID_Label(False)
End If
End Sub
Sub Save_DocGrid_Layout()
Try
If FORM_LOADED And Node_AfterSelect = False Then
Dim XMLPath = Get_DocGrid_Layout_Filename()
GridViewDoc_Search.SaveLayoutToXml(XMLPath)
Update_Notification_Label(True, "Grid Layout Saved", "")
Else
Update_Notification_Label(True, "Could not store layout", "Yellow")
Update_Notification_Label(True, "Grid Document - Layout Saved", "")
End If
Catch ex As Exception
@@ -2090,7 +2109,7 @@ Public Class frmNodeNavigation
If WM_READ_ONLY = False Then
ClassDragDrop.Drag_enter(e)
Else
Update_Notification_Label(True, "READ ONLY ACCESS", "")
Update_Notification_Label(True, "READ ONLY ACCESS", "Yellow")
End If
Else
Update_Notification_Label(True, "No entity selected", "Yellow")
@@ -2371,7 +2390,7 @@ Public Class frmNodeNavigation
INSERT_IN_ACTION = False
'Jetzt den Record nochmal laden
' Show_Selected_Record_Data(SELECTED_RECORD_ID)
Update_Notification_Label(True, "Record saved - " & Now, "")
Update_Notification_Label(True, "Record saved", "Lime")
Update_Record_Label(CURRENT_RECORD_ID)
Catch ex As Exception
@@ -2416,8 +2435,6 @@ Public Class frmNodeNavigation
mySelectedDocs = ClassDocGrid.GetSelectedDocuments(GridViewDoc_Search)
'Refresh_DocID()
If ClassDocGrid.HasNoSelectedDocuments(GridViewDoc_Search) Then
e.Cancel = True
Exit Sub
@@ -2582,8 +2599,11 @@ Public Class frmNodeNavigation
Dim allow_Open As Boolean = False
Dim oDocuments = Current_DocList.SelectedDocuments
If oDocuments.Count = 0 Then
Exit Sub
If Not IsNothing(oDocuments) Then
If oDocuments.Count <> 1 Then
MsgBox("Sorry, but no document has been selected! Please select the docúment row again!", MsgBoxStyle.Exclamation)
Exit Sub
End If
End If
Dim Result = ClassDOC_SEARCH.Get_File_Rights(oDocuments.First.DocId)
@@ -3165,7 +3185,7 @@ Public Class frmNodeNavigation
Await ReloadTreeView()
MyTreeListViewState.LoadState()
TreeListDevexpress.FocusedNode = MyFocusedNode
Update_Notification_Label(True, "Nodes reordered", "")
Update_Notification_Label(True, "Nodes reordered", "Lime")
End If
Cursor = Cursors.Default
@@ -3189,40 +3209,55 @@ Public Class frmNodeNavigation
If FORM_LOADED = False Then
Exit Sub
End If
If ViewerInit Then
If DocViewInitialized Then
CONFIG.Config.DocumentViewerShown = checkShowPreview.Checked
CONFIG.Save()
SplitContainerDocView.Collapsed = Not checkShowPreview.Checked
If checkShowPreview.Checked Then
DocView_DisplaySelectedDoc(False)
End If
Else
SplitContainerDocView.Collapsed = True
End If
End Sub
Private Sub GridViewDoc_Search_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles GridViewDoc_Search.SelectionChanged
Show_SelectedDoc(False)
DocView_DisplaySelectedDoc(False)
End Sub
Private Sub Show_SelectedDoc(AfterNodeChange As Boolean)
Dim oSelectedDocs = ClassDocGrid.GetSelectedDocuments(GridViewDoc_Search, AfterNodeChange)
If Not IsNothing(oSelectedDocs) Then
If ViewerInit Then
If oSelectedDocs.Count >= 1 Then
Refresh_DocID()
Close_Document_Viewer()
Private Async Sub DocView_DisplaySelectedDoc(AfterNodeChange As Boolean)
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oSelectedDoc = ClassDocGrid.GetSingleSelectedDocument(GridViewDoc_Search)
If Not IsNothing(oSelectedDoc) Then
If checkShowPreview.Checked Then
If DocViewInitialized Then
If oSelectedDoc.Count = 1 Then
Close_Document_Viewer()
System.Threading.Thread.Sleep(400)
Dim oDocument As ClassDocGrid.clsWMDoc = oSelectedDoc.First()
Dim oPath = ClassHelper.FORMAT_WM_PATH(oDocument.DocPath)
System.Threading.Thread.Sleep(400)
Dim oDocument As ClassDocGrid.clsWMDoc = oSelectedDocs.First()
Dim oPath = ClassHelper.FORMAT_WM_PATH(oDocument.DocPath)
DocumentViewer.LoadFile(oPath)
Else
NNLogger.Debug("Show_SelectedDoc - oSelectedDocs.Count not >= 1 ")
Close_Document_Viewer()
DocumentViewer.LoadFile(oPath)
Else
NNLogger.Debug("Show_SelectedDoc - oSelectedDocs.Count not = 1 ")
Close_Document_Viewer()
End If
Else
NNLogger.Info("DocumentViewer not inited. No Show_SelectedDoc")
End If
End If
Else
NNLogger.Info("DocumentViewer not inited. No Show_SelectedDoc")
NNLogger.Debug("Show_SelectedDoc - oSelectedDocs is nothing")
End If
Else
NNLogger.Debug("Show_SelectedDoc - oSelectedDocs is nothing")
End If
Catch ex As Exception
NNLogger.Error(ex)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
End Sub
@@ -3374,16 +3409,16 @@ Public Class frmNodeNavigation
If oDElWMFile = True Then
If WMMOD.RemoveFile(oDoc.DocPath) Then
Update_Notification_Label(True, Now.ToLongTimeString & " - File successfully deleted", "Yellow")
Update_Notification_Label(True, "File successfully deleted", "Yellow")
ClassHelper.InsertEssential_Log(oDoc.DocId, "DOC-ID", "FILE DELETED BY USER")
End If
Else
ClassHelper.InsertEssential_Log(oDoc.DocId, "DOC-ID", "FILE LINK DELETED BY USER")
Update_Notification_Label(True, Now.ToLongTimeString & " - File-links successfully deleted", "Yellow")
Update_Notification_Label(True, "File-links successfully deleted", "Yellow")
End If
Else
Update_Notification_Label(True, Now.ToLongTimeString & " - Error deleting file - Check log", "Yellow")
Update_Notification_Label(True, "Error deleting file - Check log", "Red")
End If
End If
@@ -3435,33 +3470,62 @@ Public Class frmNodeNavigation
_ActiveGrid = sender
End Sub
Private Sub bbtnitmDocResultExport_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmDocResultExport.ItemClick
Dim oActiveGrid = GetActiveGridControl()
'Dim oActiveGrid = GetActiveGridControl()
'If oActiveGrid IsNot Nothing Then
' XtraSaveFileDialog1.FileName = DT_CONSTRUCT_VIEW.Rows(0).Item("FORM_TITLE")
' XtraSaveFileDialog1.DefaultExt = ".xlsx"
If oActiveGrid IsNot Nothing Then
XtraSaveFileDialog1.FileName = oActiveGrid.Name & ".xlsx"
XtraSaveFileDialog1.DefaultExt = ".xlsx"
' If XtraSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
' Dim oOptions As New XlsxExportOptions() With {
' .ExportMode = XlsxExportMode.SingleFile
' }
' oActiveGrid.ExportToXlsx(XtraSaveFileDialog1.FileName, oOptions)
' End If
'Else
' MessageBox.Show("Please Select a grid/table that you would Like To export.", Text, MessageBoxButtons.OK)
'End If
Dim saveFileDialogDocSearchResult As New SaveFileDialog With {
.Filter = "Excel File|*.xlsx",
.Title = "Export to Excel:"
}
saveFileDialogDocSearchResult.ShowDialog()
If XtraSaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim oOptions As New XlsxExportOptions() With {
.ExportMode = XlsxExportMode.SingleFile
}
oActiveGrid.ExportToXlsx(XtraSaveFileDialog1.FileName, oOptions)
If saveFileDialogDocSearchResult.FileName <> "" Then
Dim oOptions As New XlsxExportOptionsEx With {
.ShowGridLines = True,
.AllowSortingAndFiltering = DevExpress.Utils.DefaultBoolean.True,
.ExportType = DevExpress.Export.ExportType.DataAware,
.ExportMode = XlsxExportMode.SingleFile,
.AllowFixedColumnHeaderPanel = DevExpress.Utils.DefaultBoolean.True
}
Cursor = Cursors.WaitCursor
GridViewDoc_Search.ExportToXlsx(saveFileDialogDocSearchResult.FileName, oOptions)
Dim result As MsgBoxResult
Dim msg = String.Format("Datei wurde erstellt! Wollen Sie diese nun öffnen?")
If USER_LANGUAGE <> "de-DE" Then
msg = String.Format("File was created. Do You want to open excel?")
End If
result = MessageBox.Show(msg, "Exporting result:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
Process.Start(saveFileDialogDocSearchResult.FileName)
End If
Else
MessageBox.Show("Please Select a grid/table that you would Like To export.", Text, MessageBoxButtons.OK)
End If
End Sub
Private Async Sub KnotenLöschenadminToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KnotenLöschenadminToolStripMenuItem.Click
If CURRENT_NODEID <> 0 Then
If CURRENT_NODEID <> 0 And Not IsNothing(MyFocusedNode) Then
Dim result As DialogResult = MessageBox.Show("Wollen Sie fortfahren? Der Knoten wird In Folge mit den Unterknoten als gelöscht markiert!", "Bestätigung erforderlich", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = System.Windows.Forms.DialogResult.Yes Then
Dim oSQL = $"EXEC [dbo].[PRPMO_DELETE_NODE] {CURRENT_NODEID}, '{USER_USERNAME}', 1, 0"
If MYDB_ECM.ExecuteNonQuery(oSQL) = True Then
result = MessageBox.Show("Wollen Sie die Ansicht aktualisieren?", "Knoten wurde erfolgreich gelöscht!", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = System.Windows.Forms.DialogResult.Yes Then
Await ReloadTreeView()
End If
TreeListDevexpress.DeleteNode(MyFocusedNode)
MsgBox("Knoten wurde erfolgreich gelöscht!", MsgBoxStyle.Information, "Erfolgsmeldung")
' result = MessageBox.Show("Wollen Sie die Ansicht aktualisieren?", "Knoten wurde erfolgreich gelöscht!", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
' If result = System.Windows.Forms.DialogResult.Yes Then
'Await ReloadTreeView()
'End If
End If
End If