Personalakte und ComputerAppConfig Fehler
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
Imports DevExpress.XtraTreeList
|
||||
Imports DevExpress.XtraTreeList.Columns
|
||||
Imports DevExpress.XtraTreeList.Nodes.Operations
|
||||
Imports DevExpress.XtraTreeList.Nodes
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DevExpress.XtraScheduler
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports System.Threading
|
||||
Imports System.Text
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DevExpress.XtraRichEdit.API.Native
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraScheduler
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DevExpress.XtraTreeList
|
||||
Imports DevExpress.XtraTreeList.Columns
|
||||
Imports DevExpress.XtraTreeList.Nodes
|
||||
Imports DevExpress.XtraTreeList.Nodes.Operations
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class frmNodeNavigation
|
||||
#Region "Laufzeitvariablen & Konstanten"
|
||||
@@ -40,6 +41,7 @@ Public Class frmNodeNavigation
|
||||
Private Property DT_RESULTLIST_OPTIONS As DataTable
|
||||
Private Property DT_RESULTLIST_VARIABLE_VALUE As DataTable
|
||||
Private Property DT_ENTITY_DATA As DataTable
|
||||
Private Property ENTITY_TYPE As String = ""
|
||||
Private Property DT_TBPMO_FORM_VIEW As DataTable
|
||||
Private Property DT_CONSTRUCT_VIEW As DataTable
|
||||
Private Property COUNT_RO_CONTROLS As Integer = 0
|
||||
@@ -77,6 +79,8 @@ Public Class frmNodeNavigation
|
||||
Private Property ClassNodeCommands As ClassNodeCommands
|
||||
Private Property ViewerInit As Boolean = False
|
||||
|
||||
Private PA_NODE_GUID_STAMM As Integer = 0
|
||||
|
||||
Private Debug As Boolean = False
|
||||
|
||||
Public Enum EditState
|
||||
@@ -368,7 +372,8 @@ Public Class frmNodeNavigation
|
||||
CurrentNodeConfigId = oNodeConfigId
|
||||
|
||||
AvailableConfigNodes.Clear()
|
||||
If btnCreateNewNode.Visibility = DevExpress.XtraBars.BarItemVisibility.Always Then
|
||||
If btnCreateNewNode.Visibility = DevExpress.XtraBars.BarItemVisibility.Always And
|
||||
Not IsNothing(NODE_CONFIGURABLE_NODES_DT) Then
|
||||
Dim oNodeConfigList = NODE_CONFIGURABLE_NODES_DT.Select($"PARENT_NODE = {oNodeConfigId}").
|
||||
Cast(Of DataRow).
|
||||
Select(Function(row) New frmNewNode.NodeConfig() With {
|
||||
@@ -403,7 +408,7 @@ Public Class frmNodeNavigation
|
||||
ClassControlValues.LoadControlValuesListWithPlaceholders(_EntityId, CURRENT_RECORD_ID, 0, CtrlBuilder.AllControls, _EntityId)
|
||||
CtrlBuilder.WatchRecordChanges = True
|
||||
Await Show_Selected_Record_Data(CURRENT_RECORD_ID)
|
||||
Show_SelectedDoc()
|
||||
Show_SelectedDoc(True)
|
||||
ClassRightManagement.Check_Set_Rights(CURRENT_RECORD_ID, _EntityId)
|
||||
CONTROL_HANDLING()
|
||||
|
||||
@@ -570,6 +575,24 @@ 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
|
||||
If visible = True Then
|
||||
bsiNotification.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
Else
|
||||
bsiNotification.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
End If
|
||||
|
||||
|
||||
Select Case pColor
|
||||
Case "Yellow"
|
||||
bsiNotification.ItemAppearance.Normal.BackColor = Color.Yellow
|
||||
Case "Blue"
|
||||
bsiNotification.ItemAppearance.Normal.BackColor = Color.LightBlue
|
||||
Case Else
|
||||
bsiNotification.ItemAppearance.Normal.BackColor = Color.Transparent
|
||||
End Select
|
||||
End Sub
|
||||
Public Sub Update_DocID_Label(visible As Boolean, Optional text As String = "", Optional state As EditState = EditState.None)
|
||||
bsiDocID.Caption = text
|
||||
If visible = True Then
|
||||
@@ -730,13 +753,17 @@ Public Class frmNodeNavigation
|
||||
CONTROL_DOCTYPE_MATCH = oRow.Item("CONTROL_DOCTYPE_MATCH")
|
||||
SQL_RECORD_AND_FILE_READ_ONLY = oRow.Item("SQL_RIGHT_READ_AND_VIEW_ONLY")
|
||||
SQL_DOC_READ_ONLY = oRow.Item("SQL_RIGHT_WINDREAM_VIEW")
|
||||
ENTITY_TYPE = oRow.Item("FORM_TYPE")
|
||||
Try
|
||||
ADD_RECORDS_CONSTR = oRow.Item("ADD_RECORDS")
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
ADD_RECORDS_CONSTR = True
|
||||
End Try
|
||||
|
||||
If ENTITY_TYPE = "Personal file" Then
|
||||
Dim oSQL = "SELECT CAT_STRING FROM TBDD_CATALOG WHERE CAT_TITLE = 'PA_NODE_GUID_STAMM'"
|
||||
PA_NODE_GUID_STAMM = MYDB_ECM.GetScalarValue(oSQL)
|
||||
End If
|
||||
|
||||
|
||||
expression = String.Format("ENTITY_ID = {0} AND LANGUAGE = '{1}'", _EntityId, USER_LANGUAGE)
|
||||
@@ -1150,10 +1177,15 @@ Public Class frmNodeNavigation
|
||||
End Sub
|
||||
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
|
||||
If String.IsNullOrWhiteSpace(e.FindPanelText) Then
|
||||
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim oInput As String = e.FindPanelText
|
||||
|
||||
' Split the search text into individual criteria
|
||||
Dim criteriaStrings As String() = e.FindPanelText.Split(New Char() {" "c}, StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim criteriaStrings As String() = New String() {oInput} '.Split(New Char() {" "c}, StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
' Construct the filter string by searching in the desired fields
|
||||
Dim filterConditions As IEnumerable(Of String) = criteriaStrings.Select(Function(str) _
|
||||
@@ -1167,7 +1199,7 @@ Public Class frmNodeNavigation
|
||||
|
||||
' Set the find criteria for the TreeList
|
||||
e.SetFindCriteria(findCriteria)
|
||||
|
||||
' TreeListDevexpress.ActiveFilterCriteria = findCriteria
|
||||
' Mark the event as handled
|
||||
e.Handled = True
|
||||
End Sub
|
||||
@@ -1721,7 +1753,7 @@ Public Class frmNodeNavigation
|
||||
If USER_LANGUAGE <> "de-De" Then
|
||||
oText = $"The entity-wide search will be started in background. The result will be displayed when ready."
|
||||
End If
|
||||
Update_Status_Label(True, oText, EditState.Insert)
|
||||
Update_Notification_Label(True, oText, "Yellow")
|
||||
|
||||
CURRENT_DOCSEARCH_SQL = CURRENT_DOCSEARCH_SQL.Replace("@ENTITY_ID", _EntityId)
|
||||
CURRENT_DOCSEARCH_SQL = CURRENT_DOCSEARCH_SQL.Replace("@USER_LANGUAGE", USER_LANGUAGE)
|
||||
@@ -1742,6 +1774,8 @@ Public Class frmNodeNavigation
|
||||
End Sub)
|
||||
myformThread.SetApartmentState(ApartmentState.STA)
|
||||
myformThread.Start()
|
||||
myformThread.Join()
|
||||
Update_Notification_Label(False, "", "")
|
||||
Else
|
||||
MsgBox("Please config the entity-search properly! " & vbNewLine & oSQL, vbOKOnly, "Information")
|
||||
End If
|
||||
@@ -1942,12 +1976,17 @@ Public Class frmNodeNavigation
|
||||
End Sub
|
||||
Sub Refresh_DocID()
|
||||
Dim oDocuments = Current_DocList.SelectedDocuments
|
||||
If oDocuments.Count <> 0 Then
|
||||
Dim omsg = "Doc-ID: " & oDocuments.First.DocId
|
||||
Update_DocID_Label(True, omsg, EditState.Update)
|
||||
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(True, "DocRow not selected", EditState.None)
|
||||
Update_DocID_Label(False)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub Save_DocGrid_Layout()
|
||||
Try
|
||||
@@ -1956,9 +1995,9 @@ Public Class frmNodeNavigation
|
||||
GridViewDoc_Search.SaveLayoutToXml(XMLPath)
|
||||
|
||||
|
||||
Update_Status_Label(True, "Grid Layout Saved")
|
||||
Update_Notification_Label(True, "Grid Layout Saved", "")
|
||||
Else
|
||||
Update_Status_Label(True, "Could not store layout")
|
||||
Update_Notification_Label(True, "Could not store layout", "Yellow")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -2030,10 +2069,10 @@ Public Class frmNodeNavigation
|
||||
If WM_READ_ONLY = False Then
|
||||
ClassDragDrop.Drag_enter(e)
|
||||
Else
|
||||
Update_Status_Label(True, "READ ONLY ACCESS", EditState.Insert)
|
||||
Update_Notification_Label(True, "READ ONLY ACCESS", "")
|
||||
End If
|
||||
Else
|
||||
Update_Status_Label(True, "No entity selected", EditState.Insert)
|
||||
Update_Notification_Label(True, "No entity selected", "Yellow")
|
||||
End If
|
||||
End Sub
|
||||
Private Async Function Drag_Drop(e As DragEventArgs) As Task
|
||||
@@ -2259,7 +2298,7 @@ Public Class frmNodeNavigation
|
||||
EDIT_STATE = EditState.Update
|
||||
NEW_RECORD_ID = 0
|
||||
If RECORD_CHANGED = False Then
|
||||
Update_Status_Label(True, "NO CHANGES in Record.")
|
||||
Update_Notification_Label(True, "NO CHANGES in Record.", "")
|
||||
|
||||
DisableEditMode()
|
||||
EDIT_STATE = EditState.None
|
||||
@@ -2311,7 +2350,7 @@ Public Class frmNodeNavigation
|
||||
INSERT_IN_ACTION = False
|
||||
'Jetzt den Record nochmal laden
|
||||
' Show_Selected_Record_Data(SELECTED_RECORD_ID)
|
||||
Update_Status_Label(True, "Record saved - " & Now, EditState.Update)
|
||||
Update_Notification_Label(True, "Record saved - " & Now, "")
|
||||
Update_Record_Label(CURRENT_RECORD_ID)
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -2764,7 +2803,7 @@ Public Class frmNodeNavigation
|
||||
End If
|
||||
Refresh_Selected_Table()
|
||||
|
||||
Dim oForm As New frmDocRecordLink With {.Documents = oDocuments}
|
||||
Dim oForm As New frmDocRecordLink With {.myDocuments = oDocuments}
|
||||
oForm.Show()
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -3089,7 +3128,7 @@ Public Class frmNodeNavigation
|
||||
Await ReloadTreeView()
|
||||
MyTreeListViewState.LoadState()
|
||||
TreeListDevexpress.FocusedNode = MyFocusedNode
|
||||
Update_Status_Label(True, "Nodes reordered")
|
||||
Update_Notification_Label(True, "Nodes reordered", "")
|
||||
End If
|
||||
|
||||
Cursor = Cursors.Default
|
||||
@@ -3122,25 +3161,33 @@ Public Class frmNodeNavigation
|
||||
End Sub
|
||||
|
||||
Private Sub GridViewDoc_Search_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles GridViewDoc_Search.SelectionChanged
|
||||
Show_SelectedDoc()
|
||||
Show_SelectedDoc(False)
|
||||
End Sub
|
||||
Private Sub Show_SelectedDoc()
|
||||
Dim oSelectedDocs = ClassDocGrid.GetSelectedDocuments(GridViewDoc_Search)
|
||||
If ViewerInit Then
|
||||
If oSelectedDocs.Count = 1 Then
|
||||
Refresh_DocID()
|
||||
Close_Document_Viewer()
|
||||
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()
|
||||
|
||||
System.Threading.Thread.Sleep(400)
|
||||
Dim oDocument As ClassDocGrid.clsWMDoc = oSelectedDocs.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)
|
||||
DocumentViewer.LoadFile(oPath)
|
||||
Else
|
||||
LOGGER.Debug("Show_SelectedDoc - oSelectedDocs.Count not >= 1 ")
|
||||
Close_Document_Viewer()
|
||||
End If
|
||||
Else
|
||||
Close_Document_Viewer()
|
||||
LOGGER.Info("DocumentViewer not inited. No Show_SelectedDoc")
|
||||
End If
|
||||
Else
|
||||
LOGGER.Debug("Show_SelectedDoc - oSelectedDocs is nothing")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub Close_Document_Viewer()
|
||||
Try
|
||||
@@ -3290,16 +3337,16 @@ Public Class frmNodeNavigation
|
||||
|
||||
If oDElWMFile = True Then
|
||||
If WMMOD.RemoveFile(oDoc.DocPath) Then
|
||||
Update_Status_Label(True, Now.ToLongTimeString & " - File successfully deleted", EditState.Insert)
|
||||
Update_Notification_Label(True, Now.ToLongTimeString & " - 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_Status_Label(True, Now.ToLongTimeString & " - File-links successfully deleted", EditState.Insert)
|
||||
Update_Notification_Label(True, Now.ToLongTimeString & " - File-links successfully deleted", "Yellow")
|
||||
End If
|
||||
Else
|
||||
Update_Status_Label(True, Now.ToLongTimeString & " - Error deleting file - Check log", EditState.Delete)
|
||||
Update_Notification_Label(True, Now.ToLongTimeString & " - Error deleting file - Check log", "Yellow")
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -3397,4 +3444,6 @@ Public Class frmNodeNavigation
|
||||
Private Sub frmNodeNavigation_DragDrop(sender As Object, e As DragEventArgs) Handles Me.DragDrop
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user