This commit is contained in:
SchreiberM
2016-09-27 13:23:30 +02:00
parent 8f3122c24b
commit 51bd2cdb1d
27 changed files with 2750 additions and 1921 deletions

View File

@@ -162,6 +162,7 @@ Public Class frmConstructor_Main
Private FORM_TYPE As Integer
Private ENTITY_ID As Integer
Private REDUNDANT_FORM As Integer
Private FORMVIEW_ID As Integer
Private _ENTITYSQL As String
@@ -1016,7 +1017,9 @@ Public Class frmConstructor_Main
tempsql = tempsql.Replace("@RECORD_ID", RECORD_ID)
tempsql = tempsql.Replace("@USER_ID", USER_GUID)
tempsql = tempsql.Replace("@USER_GUID", USER_GUID)
tempsql = tempsql.Replace("@ENTITY_ID", ENTITY_ID)
tempsql = tempsql.Replace("@USERNAME", Environment.UserName)
tempsql = tempsql.Replace("@USER_NAME", Environment.UserName)
''Regulären Ausdruck zum Auslesen der windream-Indexe definieren
'Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
'' einen Regulären Ausdruck laden
@@ -1232,335 +1235,14 @@ Public Class frmConstructor_Main
TreeViewMain.Nodes.Clear()
If NODE_NAVIGATION = True Then
' Rootnode erstellen und taggen
If DT_TREEVIEW_PER_CONTROLS.Rows.Count > 1 Then
' Presuming the DataTable has a column named ENTITY_ID and TYPE_NODE.
Dim expression As String
expression = "TYPE_NODE = 0"
Dim foundRowsLevel0() As DataRow
' Use the Select method to find all rows matching the filter.
foundRowsLevel0 = DT_TREEVIEW_PER_CONTROLS.Select(expression, "NODE_CAPTION")
Dim i As Integer
Dim NODE_CONFIG_ID
Dim LEVEL0_NODE As TreeNode
' For each row create a Node
For i = 0 To foundRowsLevel0.GetUpperBound(0)
Dim ID = foundRowsLevel0(i)("GUID")
Dim LevelEntity = foundRowsLevel0(i)("ENTITY_ID")
Dim controlID = foundRowsLevel0(i)("CONTROL_ID")
Dim nodetext = foundRowsLevel0(i)("NODE_CAPTION")
Dim Type_node = foundRowsLevel0(i)("TYPE_NODE")
Dim RECORD_ID = foundRowsLevel0(i)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel0(i)("NODE_CONFIG_ID")
LEVEL0_NODE = New TreeNode(nodetext)
If Not IsDBNull(RECORD_ID) Then
LEVEL0_NODE.Tag = LevelEntity & " - CONTROL-ID" & controlID.ToString & "#" & ID & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL0_NODE.Tag = LevelEntity & " - CONTROL-ID" & controlID.ToString & "#" & ID
End If
Dim index As Integer = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity Then
Exit For
End If
index += 1
Next
LEVEL0_NODE.ImageIndex = index
LEVEL0_NODE.SelectedImageIndex = index
'### LEVEL 1 laden #######
Dim expressionLevel1 As String
expressionLevel1 = "PARENT_GUID = " & ID 'TYPE_NODE = 1 AND Einschränkung auf Type 2 und Parent_Guid
Dim foundRowsLevel1() As DataRow
foundRowsLevel1 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel1, "NODE_CAPTION")
Dim j As Integer
For j = 0 To foundRowsLevel1.GetUpperBound(0)
Dim ID1 = foundRowsLevel1(j)("GUID")
Dim LevelEntity1 = foundRowsLevel1(j)("ENTITY_ID")
Dim controlID1 = foundRowsLevel1(j)("CONTROL_ID")
Dim nodetext1 = foundRowsLevel1(j)("NODE_CAPTION")
Dim Type_node1 = foundRowsLevel1(j)("TYPE_NODE")
RECORD_ID = foundRowsLevel1(j)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel1(j)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL1_NODE As TreeNode
LEVEL1_NODE = New TreeNode(nodetext1)
If Not IsDBNull(RECORD_ID) Then
LEVEL1_NODE.Tag = LevelEntity1 & "-CONTROL-ID" & controlID1.ToString & "#" & ID1 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL1_NODE.Tag = LevelEntity1 & "-CONTROL-ID" & controlID1.ToString & "#" & ID1
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity1 Then
Exit For
End If
index += 1
Next
LEVEL1_NODE.ImageIndex = index
LEVEL1_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL0_NODE.Nodes.Add(LEVEL1_NODE)
'### LEVEL 2 laden #######
Dim expressionLevel2 As String
expressionLevel2 = "PARENT_GUID = " & ID1 'TYPE_NODE = 2 AND Einschränkung auf Type und Parent_Guid
Dim foundRowsLevel2() As DataRow
foundRowsLevel2 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel2, "NODE_CAPTION")
Dim k As Integer
For k = 0 To foundRowsLevel2.GetUpperBound(0)
Dim ID2 = foundRowsLevel2(k)("GUID")
Dim LevelEntity2 = foundRowsLevel2(k)("ENTITY_ID")
Dim controlID2 = foundRowsLevel2(k)("CONTROL_ID")
Dim nodetext2 = foundRowsLevel2(k)("NODE_CAPTION")
RECORD_ID = foundRowsLevel2(k)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel2(k)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL2_NODE As TreeNode
LEVEL2_NODE = New TreeNode(nodetext2)
If Not IsDBNull(RECORD_ID) Then
LEVEL2_NODE.Tag = LevelEntity2 & "-CONTROL-ID" & controlID2.ToString & "#" & ID2 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL2_NODE.Tag = LevelEntity2 & "-CONTROL-ID" & controlID2.ToString & "#" & ID2
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity2 Then
Exit For
End If
index += 1
Next
LEVEL2_NODE.ImageIndex = index
LEVEL2_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL1_NODE.Nodes.Add(LEVEL2_NODE)
'### LEVEL 3 laden #######
Dim expressionLevel3 As String
expressionLevel3 = "PARENT_GUID = " & ID2 'TYPE_NODE = 3 AND Einschränkung auf Type und Parent_Guid
Dim foundRowsLevel3() As DataRow
foundRowsLevel3 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel3, "NODE_CAPTION")
Dim l As Integer
For l = 0 To foundRowsLevel3.GetUpperBound(0)
Dim ID3 = foundRowsLevel3(l)("GUID")
Dim LevelEntity3 = foundRowsLevel3(l)("ENTITY_ID")
Dim controlID3 = foundRowsLevel3(l)("CONTROL_ID")
Dim nodetext3 = foundRowsLevel3(l)("NODE_CAPTION")
RECORD_ID = foundRowsLevel3(l)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel3(l)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL3_NODE As TreeNode
LEVEL3_NODE = New TreeNode(nodetext3)
If Not IsDBNull(RECORD_ID) Then
LEVEL3_NODE.Tag = LevelEntity3 & "-CONTROL-ID" & controlID3.ToString & "#" & ID3 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL3_NODE.Tag = LevelEntity3 & "-CONTROL-ID" & controlID3.ToString & "#" & ID3
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity3 Then
Exit For
End If
index += 1
Next
LEVEL3_NODE.ImageIndex = index
LEVEL3_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL2_NODE.Nodes.Add(LEVEL3_NODE)
'### LEVEL 4 laden #######
Dim expressionLevel4 As String
expressionLevel4 = "PARENT_GUID = " & ID3 'TYPE_NODE = 4 AND Einschränkung auf Type und Parent_Guid
Dim foundRowsLevel4() As DataRow
foundRowsLevel4 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel4, "NODE_CAPTION")
Dim m As Integer
For m = 0 To foundRowsLevel4.GetUpperBound(0)
Dim ID5 = foundRowsLevel4(m)("GUID")
Dim LevelEntity5 = foundRowsLevel4(m)("ENTITY_ID")
Dim controlID5 = foundRowsLevel4(m)("CONTROL_ID")
Dim nodetext5 = foundRowsLevel4(m)("NODE_CAPTION")
RECORD_ID = foundRowsLevel4(m)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel4(m)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL4_NODE As TreeNode
LEVEL4_NODE = New TreeNode(nodetext5)
If Not IsDBNull(RECORD_ID) Then
LEVEL4_NODE.Tag = LevelEntity5 & "-CONTROL-ID" & controlID5.ToString & "#" & ID5 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL4_NODE.Tag = LevelEntity5 & "-CONTROL-ID" & controlID5.ToString & "#" & ID5
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity5 Then
Exit For
End If
index += 1
Next
LEVEL4_NODE.ImageIndex = index
LEVEL4_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL3_NODE.Nodes.Add(LEVEL4_NODE)
'### LEVEL 5 laden #######
Dim expressionLevel5 As String
Dim sortExp As String = "NODE_CONFIG_ID, NODE_CAPTION"
expressionLevel5 = "PARENT_GUID = " & ID5 'TYPE_NODE = 5 AND Einschränkung auf Type und Parent_Guid
Dim foundRowsLevel5() As DataRow
foundRowsLevel5 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel5, sortExp)
Dim n As Integer
If ID5 = 1146 Then
Console.WriteLine("Aha")
End If
For n = 0 To foundRowsLevel5.GetUpperBound(0)
Dim ID6 = foundRowsLevel5(n)("GUID")
Dim LevelEntity6 = foundRowsLevel5(n)("ENTITY_ID")
Dim controlID6 = foundRowsLevel5(n)("CONTROL_ID")
Dim nodetext6 = foundRowsLevel5(n)("NODE_CAPTION")
RECORD_ID = foundRowsLevel5(n)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel5(n)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL5_NODE As TreeNode
LEVEL5_NODE = New TreeNode(nodetext6)
If Not IsDBNull(RECORD_ID) Then
LEVEL5_NODE.Tag = LevelEntity6 & "-CONTROL-ID" & controlID6.ToString & "#" & ID6 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL5_NODE.Tag = LevelEntity6 & "-CONTROL-ID" & controlID6.ToString & "#" & ID6
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity6 Then
Exit For
End If
index += 1
Next
LEVEL5_NODE.ImageIndex = index
LEVEL5_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL4_NODE.Nodes.Add(LEVEL5_NODE)
'### LEVEL 5 laden #######
Dim expressionLevel6 As String
expressionLevel6 = "PARENT_GUID = " & ID6 'TYPE_NODE = 6 AND Einschränkung auf Type und Parent_Guid
Dim foundRowsLevel6() As DataRow
foundRowsLevel6 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel6, sortExp)
If ID6 = 1146 Then
Console.WriteLine("Aha")
End If
Dim o As Integer
For o = 0 To foundRowsLevel6.GetUpperBound(0)
Dim ID7 = foundRowsLevel6(o)("GUID")
Dim LevelEntity7 = foundRowsLevel6(o)("ENTITY_ID")
Dim controlID7 = foundRowsLevel6(o)("CONTROL_ID")
Dim nodetext7 = foundRowsLevel6(o)("NODE_CAPTION")
RECORD_ID = foundRowsLevel6(o)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel6(o)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL6_NODE As TreeNode
LEVEL6_NODE = New TreeNode(nodetext7)
If Not IsDBNull(RECORD_ID) Then
LEVEL6_NODE.Tag = LevelEntity7 & "-CONTROL-ID" & controlID7.ToString & "#" & ID7 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL6_NODE.Tag = LevelEntity7 & "-CONTROL-ID" & controlID7.ToString & "#" & ID7
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity7 Then
Exit For
End If
index += 1
Next
LEVEL6_NODE.ImageIndex = index
LEVEL6_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL5_NODE.Nodes.Add(LEVEL6_NODE)
'### LEVEL 7 laden #######
Dim expressionLevel7 As String
expressionLevel7 = "PARENT_GUID = " & ID7 'TYPE_NODE = 7 AND Einschränkung auf Type und Parent_Guid
Dim foundRowsLevel7() As DataRow
foundRowsLevel7 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel7, sortExp)
Dim p As Integer
For p = 0 To foundRowsLevel7.GetUpperBound(0)
Dim ID8 = foundRowsLevel7(p)("GUID")
Dim LevelEntity8 = foundRowsLevel7(p)("ENTITY_ID")
Dim controlID8 = foundRowsLevel7(p)("CONTROL_ID")
Dim nodetext8 = foundRowsLevel7(p)("NODE_CAPTION")
RECORD_ID = foundRowsLevel7(p)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel7(p)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL7_NODE As TreeNode
LEVEL7_NODE = New TreeNode(nodetext8)
If Not IsDBNull(RECORD_ID) Then
LEVEL7_NODE.Tag = LevelEntity8 & "-CONTROL-ID" & controlID8.ToString & "#" & ID8 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL7_NODE.Tag = LevelEntity8 & "-CONTROL-ID" & controlID8.ToString & "#" & ID8
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity8 Then
Exit For
End If
index += 1
Next
LEVEL7_NODE.ImageIndex = index
LEVEL7_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL6_NODE.Nodes.Add(LEVEL7_NODE)
'### LEVEL 7 laden #######
Dim expressionLevel8 As String
expressionLevel8 = "PARENT_GUID = " & ID8 'TYPE_NODE = 7 AND Einschränkung auf Type und Parent_Guid
Dim foundRowsLevel8() As DataRow
foundRowsLevel8 = DT_TREEVIEW_PER_CONTROLS.Select(expressionLevel8, sortExp)
Dim q As Integer
For q = 0 To foundRowsLevel8.GetUpperBound(0)
Dim ID9 = foundRowsLevel8(q)("GUID")
Dim LevelEntity9 = foundRowsLevel8(q)("ENTITY_ID")
Dim controlID9 = foundRowsLevel8(q)("CONTROL_ID")
Dim nodetext9 = foundRowsLevel8(q)("NODE_CAPTION")
RECORD_ID = foundRowsLevel8(q)("RECORD_ID")
NODE_CONFIG_ID = foundRowsLevel8(q)("NODE_CONFIG_ID")
' Node erstellen..
Dim LEVEL8_NODE As TreeNode
LEVEL8_NODE = New TreeNode(nodetext9)
If Not IsDBNull(RECORD_ID) Then
LEVEL8_NODE.Tag = LevelEntity9 & "-CONTROL-ID" & controlID9.ToString & "#" & ID9 & "#RECORD-ID" & RECORD_ID.ToString
Else
LEVEL8_NODE.Tag = LevelEntity9 & "-CONTROL-ID" & controlID9.ToString & "#" & ID9
End If
index = 0
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
If img = NODE_CONFIG_ID & "#" & LevelEntity9 Then
Exit For
End If
index += 1
Next
LEVEL8_NODE.ImageIndex = index
LEVEL8_NODE.SelectedImageIndex = index
' ..und einfügen
LEVEL7_NODE.Nodes.Add(LEVEL8_NODE)
'### LEVEL 8 laden #######
Next ' Level 7 Ende
Next ' Level 7 Ende
Next ' Level 6 Ende
Next ' Level 5 Ende
Next 'Level 4 Ende
Next 'Level 3 Ende
Next ' Level 2 Ende
Next 'Level 1 Ende
Next
TreeViewMain.Nodes.Add(LEVEL0_NODE)
Else
MsgBox("Check the Control Navigation Option or inform Digital Data!", MsgBoxStyle.Critical)
Me.Close()
End If
Try
Dim MainNode = ClassNodeNavigation.CreateTreeViewNodes(DT_TREEVIEW_PER_CONTROLS, TREEVIEW_IMAGELIST)
If Not IsNothing(MainNode) Then
TreeViewMain.Nodes.Add(MainNode)
End If
Catch ex As Exception
MsgBox("Error in Load TreeView NodesNavigation:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Else
' LINQ für Zugriff auf DT_VWPMO_CONSTRUCTOR_FORMS
Dim query1 = From form In DT_VWPMO_CONSTRUCTOR_FORMS.AsEnumerable()
@@ -2551,6 +2233,12 @@ Public Class frmConstructor_Main
FORM_TYPE = ENTITY_ROW.Item("FORM_TYPE_ID")
IS_SINGLE_RECORD = ENTITY_ROW.Item("SINGLE_RECORD")
POS_ENTITY = ENTITY_ROW.Item("POS_ENTITY")
REDUNDANT_FORM = ENTITY_ROW.Item("REDUNDANT_ENTITY")
If REDUNDANT_FORM <> 0 Then
CURRENT_ENTITY_REDUNDANT_ID = REDUNDANT_FORM
Else
CURRENT_ENTITY_REDUNDANT_ID = 0
End If
If VIEW_ID_RUNTIME <> -1 Then
GRID_TYPE_ID = VIEW_ID_RUNTIME
Else
@@ -4504,7 +4192,7 @@ Public Class frmConstructor_Main
Dim item As ClassWindreamDocGrid.WindreamDocGridComboboxItem = ComboBox.SelectedItem
Dim value As String = item.Value
Dim configId As Integer = item.ConfigID
Dim docId As Integer = ClassWindreamDocGrid.RESULT_DOC_ID
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim user As String = Environment.UserName
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configId, value, user)
@@ -4520,7 +4208,7 @@ Public Class frmConstructor_Main
Dim value As DateTime = DatePicker.EditValue
Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
Dim docId As Integer = ClassWindreamDocGrid.RESULT_DOC_ID
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim user As String = Environment.UserName
Dim dateString = value.ToString("yyyy-MM-dd hh:mm:ss.fff")
@@ -4538,7 +4226,7 @@ Public Class frmConstructor_Main
Dim value = TextBox.EditValue
Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
Dim docId As Integer = ClassWindreamDocGrid.RESULT_DOC_ID
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim user As String = Environment.UserName
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configId, value, user)
@@ -4852,9 +4540,17 @@ Public Class frmConstructor_Main
Sub Drag_Drop(e As DragEventArgs)
If act_FormViewID <> 0 And RIGHT_WINDREAM_FORBIDDEN = False Then
Dim sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORMVIEW_ID = " & FORMVIEW_ID
If ClassDatabase.Execute_Scalar(sql, True) = 0 Then
Dim count_DT = ClassDatabase.Execute_Scalar(sql, True)
If count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID = 0 Then
MsgBox("No documenttypes for this entity configured! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
Exit Sub
ElseIf count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID <> 0 Then
sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORM_ID = " & CURRENT_ENTITY_REDUNDANT_ID
count_DT = ClassDatabase.Execute_Scalar(sql, True)
If count_DT = 0 Then
MsgBox("No documenttypes for this entity configured! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
Exit Sub
End If
End If
If RECORD_CHANGED = True Then
If Save_Record() = False Then
@@ -4945,32 +4641,41 @@ Public Class frmConstructor_Main
Next
Dim sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORMVIEW_ID = " & FORMVIEW_ID
If ClassDatabase.Execute_Scalar(sql, True) >= 1 Then
Dim sql1 = String.Format("SELECT GUID, FILENAME2WORK, USER_WORK, HANDLE_TYPE, WORKED, ADDED_WHEN FROM TBPMO_FILES_USER WHERE (UPPER(USER_WORK) = UPPER('{0}')) AND WORKED = 0", Environment.UserName)
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql1)
If Not IsNothing(DT) Then
If DT.Rows.Count > 0 Then
For Each Filerow As DataRow In DT.Rows
'Dim datei = Str.ToString.Replace("@DROPFROMFSYSTEM@", "")
CURRENT_FILEID = Filerow.Item(0)
CURRENT_PARENT_ENTITY_ID = PARENT_ENTITYID
CURRENT_RECORD_ID = RECORD_ID
CURRENT_FORM_ID = ENTITY_ID
CURRENT_FORMVIEW_ID = FORMVIEW_ID
If ClassDatabase.Execute_Scalar("SELECT COUNT(*) FROM TBPMO_FILES_USER WHERE GUID = " & CURRENT_FILEID & " AND WORKED = 0") = 1 Then
frmWD_IndexFile.ShowDialog()
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> File was deleted or worked meanwhile!")
End If
Next
RUN_WDSEARCH_GRID("RECORD")
' RUN_WD_SEARCH(WD_Suche, "RECORD")
End If
End If
Else
Dim count_DT = ClassDatabase.Execute_Scalar(sql, True)
If count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID = 0 Then
MsgBox("No documenttypes for this entity configured! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
Exit Sub
ElseIf count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID <> 0 Then
sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORM_ID = " & CURRENT_ENTITY_REDUNDANT_ID
count_DT = ClassDatabase.Execute_Scalar(sql, True)
If count_DT = 0 Then
MsgBox("No documenttypes for the redundant entity configured either! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
Exit Sub
End If
End If
Dim sql1 = String.Format("SELECT GUID, FILENAME2WORK, USER_WORK, HANDLE_TYPE, WORKED, ADDED_WHEN FROM TBPMO_FILES_USER WHERE (UPPER(USER_WORK) = UPPER('{0}')) AND WORKED = 0", Environment.UserName)
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql1)
If Not IsNothing(DT) Then
If DT.Rows.Count > 0 Then
For Each Filerow As DataRow In DT.Rows
'Dim datei = Str.ToString.Replace("@DROPFROMFSYSTEM@", "")
CURRENT_FILEID = Filerow.Item(0)
CURRENT_PARENT_ENTITY_ID = PARENT_ENTITYID
CURRENT_RECORD_ID = RECORD_ID
CURRENT_FORM_ID = ENTITY_ID
CURRENT_FORMVIEW_ID = FORMVIEW_ID
If ClassDatabase.Execute_Scalar("SELECT COUNT(*) FROM TBPMO_FILES_USER WHERE GUID = " & CURRENT_FILEID & " AND WORKED = 0") = 1 Then
frmWD_IndexFile.ShowDialog()
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> File was deleted or worked meanwhile!")
End If
Next
RUN_WDSEARCH_GRID("RECORD")
' RUN_WD_SEARCH(WD_Suche, "RECORD")
End If
End If
Catch ex As Exception
MsgBox("Check_Dropped_Files: " & ex.Message, MsgBoxStyle.Critical)
End Try
@@ -5779,11 +5484,11 @@ Public Class frmConstructor_Main
End Sub
Private Sub KopierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CopyToolStripMenuItem.Click
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
If ClassWindreamDocGrid.SELECTED_DOC_PATH <> "" Then
Try
Dim selectedfile(0) As String
selectedfile(0) = ClassWindreamDocGrid.RESULT_DOC_PATH
selectedfile(0) = ClassWindreamDocGrid.SELECTED_DOC_PATH
Dim dataobj As New DataObject
@@ -5808,34 +5513,40 @@ Public Class frmConstructor_Main
MsgBox("Please select a record!", MsgBoxStyle.Exclamation)
Exit Sub
End If
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
Dim msg = "Wollen Sie die Verknüpfung der Datei wirklich entfernen?" & vbNewLine & "Datei bleibt im DMS/Archiv/Explorer erhalten!"
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
Exit Sub
End If
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count > 0 Then
Dim msg = "Wollen Sie die Verknüpfung der gewählten Datei/en wirklich entfernen?" & vbNewLine & "Datei/en bleibt/bleiben im DMS/Archiv/Explorer erhalten!"
If USER_LANGUAGE <> "de-DE" Then
msg = "Would You like to delete only the references?" & vbNewLine & "File will stay in ECM/Archive/Explorer!"
msg = "Would You like to delete only the references?" & vbNewLine & "File(s) will stay in ECM/Archive/Explorer!"
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
Try
Dim DT_INDICES As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPMO_WD_OBJECTTYPE WHERE OBJECT_TYPE = '" & ClassWindreamDocGrid.RESULT_OBJECTTYPE & "'")
If Not IsNothing(DT_INDICES) Then
If DT_INDICES.Rows.Count = 1 Then
'Record-Links entfernen
If ClassWindream.REMOVE_VEKTOR_LINK(ClassWindreamDocGrid.RESULT_DOC_PATH, DT_INDICES.Rows(0).Item("IDXNAME_RECORDID"), RECORD_ID) = True Then
'ENTITY-Links entfernen
If ClassWindream.REMOVE_VEKTOR_LINK(ClassWindreamDocGrid.RESULT_DOC_PATH, DT_INDICES.Rows(0).Item("IDXNAME_ENTITYID"), ENTITY_ID) = True Then
If ClassFileResult.Delete_ResultFile(ClassWindreamDocGrid.RESULT_DOC_ID) = True Then
ClassHelper.InsertEssential_Log(ClassWindreamDocGrid.RESULT_DOC_ID, "DOC-ID", "RECORD LINK REMOVED FROM DOC-SEARCH")
RUN_WDSEARCH_GRID("RECORD")
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
Dim DT_INDICES As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPMO_WD_OBJECTTYPE WHERE OBJECT_TYPE = '" & row.Item("OBJECTTYPE") & "'")
If Not IsNothing(DT_INDICES) Then
If DT_INDICES.Rows.Count = 1 Then
'Record-Links entfernen
If ClassWindream.REMOVE_VEKTOR_LINK(row.Item("DOC_PATH"), DT_INDICES.Rows(0).Item("IDXNAME_RECORDID"), RECORD_ID) = True Then
'ENTITY-Links entfernen
If ClassWindream.REMOVE_VEKTOR_LINK(row.Item("DOC_PATH"), DT_INDICES.Rows(0).Item("IDXNAME_ENTITYID"), ENTITY_ID) = True Then
If ClassFileResult.Delete_ResultFile(row.Item("DOC_ID")) = True Then
ClassHelper.InsertEssential_Log(row.Item("DOC_ID"), "DOC-ID", "RECORD LINK REMOVED FROM DOC-SEARCH")
RUN_WDSEARCH_GRID("RECORD")
End If
Else
MsgBox("Could not remove Vektor-Link ENTITY! Check logfile.", MsgBoxStyle.Exclamation)
End If
Else
MsgBox("Could not remove Vektor-Link ENTITY! Check logfile.", MsgBoxStyle.Exclamation)
MsgBox("Could not remove Vektor-Link RECORD! Check logfile.", MsgBoxStyle.Exclamation)
End If
Else
MsgBox("Could not remove Vektor-Link RECORD! Check logfile.", MsgBoxStyle.Exclamation)
End If
End If
End If
Next
Catch ex As Exception
MsgBox("Unexpected Error in Removing links from file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
@@ -5844,30 +5555,50 @@ Public Class frmConstructor_Main
End Sub
Private Sub EigenschaftenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PropertiesToolStripMenuItem.Click
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
Cursor = Cursors.WaitCursor
Dim sei As New SHELLEXECUTEINFO
sei.cbSize = Marshal.SizeOf(sei)
sei.lpVerb = "properties"
sei.lpFile = ClassWindreamDocGrid.RESULT_DOC_PATH
sei.nShow = SW_SHOW
sei.fMask = SEE_MASK_INVOKEIDLIST
If Not ShellExecuteEx(sei) Then
Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())
MsgBox("Unexpected Error in Open file propertys:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End If
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
Cursor = Cursors.Default
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
If row.Item("DOC_PATH") <> "" Then
Cursor = Cursors.WaitCursor
Dim sei As New SHELLEXECUTEINFO
sei.cbSize = Marshal.SizeOf(sei)
sei.lpVerb = "properties"
sei.lpFile = row.Item("DOC_PATH")
sei.nShow = SW_SHOW
sei.fMask = SEE_MASK_INVOKEIDLIST
If Not ShellExecuteEx(sei) Then
Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())
MsgBox("Unexpected Error in Open file propertys:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End If
End If
Cursor = Cursors.Default
Next
End Sub
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateiÖffnenToolStripMenuItem.Click
ClassHelper.File_open(ClassWindreamDocGrid.RESULT_DOC_PATH, ClassWindreamDocGrid.RESULT_DOC_ID)
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
ClassHelper.File_open(row.Item("DOC_PATH"), row.Item("DOC_ID"))
Next
End Sub
Private Sub GridControlDocSearch_DoubleClick(sender As Object, e As EventArgs) Handles GridControlDocSearch.DoubleClick
'Get_Doc_Items()
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
If RIGHT_WINDREAM_FORBIDDEN = False Then
ClassHelper.File_open(ClassWindreamDocGrid.RESULT_DOC_PATH, ClassWindreamDocGrid.RESULT_DOC_ID)
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(5)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
ClassHelper.File_open(row.Item("DOC_PATH"), row.Item("DOC_ID"))
Next
End If
End Sub
@@ -6134,11 +5865,11 @@ Public Class frmConstructor_Main
Try
If tsTextBoxRenameFile.Text <> "" Then
Dim OldName, NewName As String
OldName = ClassWindreamDocGrid.RESULT_DOC_PATH
OldName = ClassWindreamDocGrid.SELECTED_DOC_PATH
' Define file names.
NewName = tsTextBoxRenameFile.Text
Dim name1 = Path.Combine(Path.GetDirectoryName(ClassWindreamDocGrid.RESULT_DOC_PATH), NewName)
NewName = NewName & Path.GetExtension(ClassWindreamDocGrid.RESULT_DOC_PATH)
Dim name1 = Path.Combine(Path.GetDirectoryName(ClassWindreamDocGrid.SELECTED_DOC_PATH), NewName)
NewName = NewName & Path.GetExtension(ClassWindreamDocGrid.SELECTED_DOC_PATH)
' Rename file.
My.Computer.FileSystem.RenameFile(OldName, NewName)
RUN_WDSEARCH_GRID("RECORD")
@@ -6158,9 +5889,20 @@ Public Class frmConstructor_Main
End Sub
Sub Display_Filename()
Try
If ClassWindreamDocGrid.RESULT_DOC_PATH <> "" Then
Dim RENAME_DOC_PATH
Try
RENAME_DOC_PATH = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("FULLPATH"))
Catch ex As Exception
ClassLogger.Add(">> Attention: Could not set DocVariable RENAME_DOC_PATH: " & ex.Message, False)
RENAME_DOC_PATH = Nothing
End Try
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters!", MsgBoxStyle.Exclamation)
Exit Sub
End If
If RENAME_DOC_PATH <> "" Then
Dim FileToRename As String
FileToRename = Path.GetFileNameWithoutExtension(ClassWindreamDocGrid.RESULT_DOC_PATH)
FileToRename = Path.GetFileNameWithoutExtension(RENAME_DOC_PATH)
tsTextBoxRenameFile.Text = FileToRename
tsTextBoxRenameFile.Enabled = True
Else
@@ -6172,10 +5914,19 @@ Public Class frmConstructor_Main
End Sub
Private Sub DateiMitDatensatzVerknüpfenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TSMI_linkRecord.Click
Dim fileName As String = ClassWindreamDocGrid.RESULT_DOC_PATH
CURRENT_DOC_ID = ClassWindreamDocGrid.RESULT_DOC_ID
Dim frm As New frmWD_Link_to_Record(fileName, ClassWindreamDocGrid.RESULT_OBJECTTYPE)
frm.Show()
Try
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters (LinkRecord)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
Dim fileName As String = ClassWindreamDocGrid.SELECTED_DOC_PATH
CURRENT_DOC_ID = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim frm As New frmWD_Link_to_Record() 'fileName, ClassWindreamDocGrid.RESULT_OBJECTTYPE)
frm.Show()
Catch ex As Exception
MsgBox("Unexpected Error in Linking Record: " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub DetailAnsichtDatensatzToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DetailAnsichtDatensatzToolStripMenuItem.Click
@@ -6214,41 +5965,44 @@ Public Class frmConstructor_Main
Try
Dim DROPDOWN_VALUE
'Den ColumnTitle aus ConfigTableholen
If CURRENT_DOC_DROPDOWN.Rows.Count > 0 Then
For Each confrow As DataRow In CURRENT_DOC_DROPDOWN.Rows
Dim CAPTION = confrow.Item("HEADER_CAPTION")
DROPDOWN_VALUE = GridViewDoc_Search.GetRowCellValue(e.RowHandle, CAPTION)
If Not IsNothing(DROPDOWN_VALUE) Then
Exit For
End If
Next
If Not IsNothing(DROPDOWN_VALUE) Then
Dim ColorRow As Color
Dim expression As String = String.Format("VALUE = '{0}'", DROPDOWN_VALUE)
Dim matchingRows() As DataRow = DT_DOCRESULT_DROPDOWN_ITEMS.Select(expression, "SEQUENCE")
Dim rowcolorname As String
'Die Color für den value auswählen
For Each matchingRow As DataRow In matchingRows
rowcolorname = matchingRow.Item("COLOR")
If rowcolorname <> "" Then
If Not IsNothing(CURRENT_DOC_DROPDOWN) Then
'Den ColumnTitle aus ConfigTableholen
If CURRENT_DOC_DROPDOWN.Rows.Count > 0 Then
For Each confrow As DataRow In CURRENT_DOC_DROPDOWN.Rows
Dim CAPTION = confrow.Item("HEADER_CAPTION")
DROPDOWN_VALUE = GridViewDoc_Search.GetRowCellValue(e.RowHandle, CAPTION)
If Not IsNothing(DROPDOWN_VALUE) Then
Exit For
End If
Next
If rowcolorname <> "" Then
ColorRow = Color.FromName(rowcolorname)
e.Appearance.BackColor = ColorRow
e.HighPriority = True
If Not IsNothing(DROPDOWN_VALUE) Then
Dim ColorRow As Color
Dim expression As String = String.Format("VALUE = '{0}'", DROPDOWN_VALUE)
Dim matchingRows() As DataRow = DT_DOCRESULT_DROPDOWN_ITEMS.Select(expression, "SEQUENCE")
Dim rowcolorname As String = ""
'Die Color für den value auswählen
For Each matchingRow As DataRow In matchingRows
rowcolorname = matchingRow.Item("COLOR")
If rowcolorname <> "" Then
Exit For
End If
Next
If rowcolorname <> "" Then
ColorRow = Color.FromName(rowcolorname)
e.Appearance.BackColor = ColorRow
e.HighPriority = True
End If
'Dim c As Color = DirectCast(rowCellValue, Color)
End If
'Dim c As Color = DirectCast(rowCellValue, Color)
End If
End If
Catch ex As Exception
ClassLogger.Add(">> Unexpected Error in RowStyle-Color Dropdown: " & ex.Message, False)
End Try
@@ -6258,18 +6012,24 @@ Public Class frmConstructor_Main
Private Sub ContextMenuStripResultFiles_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripResultFiles.Opening
File_in_Work()
If ClassWindreamDocGrid.RESULT_DISPLAYNAME <> "" Then
TSMIDisplayname.Visible = True
Set_Displayname()
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then
If ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DISPLAYNAME") <> "" Then
TSMIDisplayname.Visible = True
Set_Displayname()
Else
TSMIDisplayname.Visible = False
End If
Else
TSMIDisplayname.Visible = False
End If
End Sub
Sub File_in_Work()
TSMI_inWork.Enabled = True
Try
Dim expression As String
expression = "DocID = " & ClassWindreamDocGrid.RESULT_DOC_ID
expression = "DocID = " & ClassWindreamDocGrid.SELECTED_DOC_ID
Dim foundRowsLevel0() As DataRow
' Use the Select method to find all rows matching the filter.
foundRowsLevel0 = CURRENT_DOC_RESULTS.Select(expression)
@@ -6285,7 +6045,7 @@ Public Class frmConstructor_Main
Dim displ As String
If CBool(ClassWindreamDocGrid.RESULT_INWORK) = True Then
If CBool(ClassWindreamDocGrid.SELECTED_INWORK) = True Then
If IW_USER.ToUpper = Environment.UserName.ToUpper Then
displ = "Datei wieder freigeben"
If USER_LANGUAGE <> "de-DE" Then
@@ -6310,8 +6070,12 @@ Public Class frmConstructor_Main
End Try
End Sub
Private Sub TSMI_inWork_Click(sender As Object, e As EventArgs) Handles TSMI_inWork.Click
ClassFileResult.DocID = ClassWindreamDocGrid.RESULT_DOC_ID
If ClassWindreamDocGrid.RESULT_INWORK = True Then ' Datei ist in Bearbeitung
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters (3)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
ClassFileResult.DocID = ClassWindreamDocGrid.SELECTED_DOC_ID
If ClassWindreamDocGrid.SELECTED_INWORK = True Then ' Datei ist in Bearbeitung
Dim displ As String
If IW_USER.ToUpper = Environment.UserName.ToUpper Then
If ClassFileResult.Set_InWork(0, "") = True Then
@@ -6326,21 +6090,14 @@ Public Class frmConstructor_Main
End If
Else
frmFileInWork.ShowDialog()
ClassWindreamDocGrid.RESULT_INWORK = ClassFileResult.InWork
ClassWindreamDocGrid.SELECTED_INWORK = ClassFileResult.InWork
RUN_WDSEARCH_GRID("RECORD")
End If
End Sub
Private Sub GridViewDoc_Search_FocusedColumnChanged(sender As Object, e As FocusedColumnChangedEventArgs) Handles GridViewDoc_Search.FocusedColumnChanged
'Get_Doc_Items()
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
End Sub
Private Sub AnsichtZurücksetzenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AnsichtZurücksetzenToolStripMenuItem.Click
' TODO: Ansicht zurücksetzen
Try
Dim XMLPath = Get_DocGRid_Layout_Filename()
Dim XMLPath = Get_DocGrid_Layout_Filename()
If File.Exists(XMLPath) Then
Me.Cursor = Cursors.WaitCursor
File.Delete(XMLPath)
@@ -6365,9 +6122,11 @@ Public Class frmConstructor_Main
End Sub
Sub Set_Displayname()
Try
If ClassWindreamDocGrid.RESULT_DISPLAYNAME <> "" Then
tstbDisplayname.Text = ClassWindreamDocGrid.RESULT_DISPLAYNAME
tstbDisplayname.Enabled = True
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then
If ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DISPLAYNAME") <> "" Then
tstbDisplayname.Text = ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DISPLAYNAME")
tstbDisplayname.Enabled = True
End If
Else
tstbDisplayname.Enabled = False
End If
@@ -6380,7 +6139,7 @@ Public Class frmConstructor_Main
Private Sub tstbDisplayname_KeyUp(sender As Object, e As KeyEventArgs) Handles tstbDisplayname.KeyUp
If e.KeyCode = Keys.Return Then
Try
ClassFileResult.DocID = ClassWindreamDocGrid.RESULT_DOC_ID
ClassFileResult.DocID = ClassWindreamDocGrid.SELECTED_DOC_ID
If tstbDisplayname.Text <> "" Then
If ClassFileResult.Set_Displayname(tstbDisplayname.Text) Then
@@ -6397,18 +6156,25 @@ Public Class frmConstructor_Main
Private Sub TestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles tsmiRights.Click
Dim msg = "Die Rechte wurden erfolgreich überprüft und aktualisiert!"
CURRENT_RECORD_ID = RECORD_ID
If ClassDOC_SEARCH.SET_WD_RIGHTS(ClassWindreamDocGrid.RESULT_DOC_ID, ClassWindreamDocGrid.RESULT_DOC_PATH, ENTITY_ID) = True Then
If USER_LANGUAGE <> "de-DE" Then
msg = "The rights were successfully renewed!"
End If
MsgBox(msg, MsgBoxStyle.Information)
Else
msg = "Unerwarteter Fehler im Rechtemodul. Bitte prüfen Sie die Logdatei!"
If USER_LANGUAGE <> "de-DE" Then
msg = "Unexpected error in rights-module. Please check the logfile!"
End If
MsgBox(msg, MsgBoxStyle.Exclamation)
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters (6)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
If ClassDOC_SEARCH.SET_WD_RIGHTS(row.Item("DOC_ID"), row.Item("DOC_PATH"), ENTITY_ID) = True Then
If USER_LANGUAGE <> "de-DE" Then
msg = "The rights were successfully renewed!"
End If
MsgBox(msg, MsgBoxStyle.Information)
Else
msg = "Unerwarteter Fehler im Rechtemodul. Bitte prüfen Sie die Logdatei!"
If USER_LANGUAGE <> "de-DE" Then
msg = "Unexpected error in rights-module. Please check the logfile!"
End If
MsgBox(msg, MsgBoxStyle.Exclamation)
End If
Next
End Sub
Public Sub ActivateAllTabs()
@@ -6446,34 +6212,41 @@ Public Class frmConstructor_Main
MsgBox("Please select a record!", MsgBoxStyle.Exclamation)
Exit Sub
End If
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
Dim msg = "Sind Sie sicher, dass Sie die Datei " & vbNewLine & ClassWindreamDocGrid.RESULT_DOC_PATH & vbNewLine & "endgültig löschen wollen?"
If USER_LANGUAGE <> "de-DE" Then
msg = "Are You sure You want to permanently delete this file?" & vbNewLine & ClassWindreamDocGrid.RESULT_DOC_PATH
End If
Dim result1 As MsgBoxResult
result1 = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result1 = MsgBoxResult.Yes Then
Try
If Not IsNothing(ClassWindreamDocGrid.RESULT_DOC_ID) Then
If ClassWindream.Delete_WDFile(ClassWindreamDocGrid.RESULT_DOC_PATH) = True Then
If ClassFileResult.Delete_ResultFile(ClassWindreamDocGrid.RESULT_DOC_ID) = True Then
ClassHelper.InsertEssential_Log(ClassWindreamDocGrid.RESULT_DOC_ID, "DOC-ID", "FILE DELETED BY USER")
RUN_WDSEARCH_GRID("RECORD")
Else
msg = String.Format("Die Datei {0} konnte nicht gelöscht werden! Prüfen Sie die logfile!", ClassWindreamDocGrid.RESULT_DOC_PATH)
If USER_LANGUAGE <> "de-DE" Then
msg = String.Format("The file {0} could not be deleted! Check the logfile!", ClassWindreamDocGrid.RESULT_DOC_PATH)
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters (DELETE FILES)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
If row.Item("DOC_PATH") <> "" Then
Dim msg = "Sind Sie sicher, dass Sie die Datei " & vbNewLine & row.Item("DOC_PATH") & vbNewLine & "endgültig löschen wollen?"
If USER_LANGUAGE <> "de-DE" Then
msg = "Are You sure You want to permanently delete this file?" & vbNewLine & row.Item("DOC_PATH")
End If
Dim result1 As MsgBoxResult
result1 = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result1 = MsgBoxResult.Yes Then
Try
If Not IsNothing(row.Item("DOC_ID")) Then
If ClassWindream.Delete_WDFile(row.Item("DOC_PATH")) = True Then
If ClassFileResult.Delete_ResultFile(row.Item("DOC_ID")) = True Then
ClassHelper.InsertEssential_Log(row.Item("DOC_ID"), "DOC-ID", "FILE DELETED BY USER")
RUN_WDSEARCH_GRID("RECORD")
Else
msg = String.Format("Die Datei {0} konnte nicht gelöscht werden! Prüfen Sie die logfile!", row.Item("DOC_PATH"))
If USER_LANGUAGE <> "de-DE" Then
msg = String.Format("The file {0} could not be deleted! Check the logfile!", row.Item("DOC_PATH"))
End If
MsgBox(msg, MsgBoxStyle.Critical, "Attention:")
End If
MsgBox(msg, MsgBoxStyle.Critical, "Attention:")
End If
End If
End If
Catch ex As Exception
MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Catch ex As Exception
MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If
End If
End If
Next
End Sub
End Class