This commit is contained in:
SchreiberM
2016-11-09 11:06:41 +01:00
parent a3a0a318c1
commit 2d1d789bdc
7 changed files with 1561 additions and 779 deletions

View File

@@ -160,6 +160,12 @@ Public Class ClassDOC_SEARCH
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Shared Function Get_DOCRESULTS(vDT_RESULTLIST_OPTIONS As DataTable, vDT_RESULTLIST_SELVALUES As DataTable, DT_WINDREAM_RESULTLIST As DataTable, ENT_ID As Integer, vType As String, Optional ftString As String = "", Optional BG As Boolean = False)
ENTITY_ID = ENT_ID
DT_RESULTLIST_OPTIONS = vDT_RESULTLIST_OPTIONS
DT_RESULTLIST_SEL_VALUES = vDT_RESULTLIST_SELVALUES
Return GET_DOCSEARCH_DATATABLE(vType, ftString, BG)
End Function
Public Shared Function Get_DOC_RESULTTABLE(vDT_RESULTLIST_OPTIONS As DataTable, vDT_RESULTLIST_SELVALUES As DataTable, DT_WINDREAM_RESULTLIST As DataTable, ENT_ID As Integer, REC_ID As Integer, vType As String, Optional ftString As String = "", Optional BG As Boolean = False, Optional Preload As Boolean = False) Public Shared Function Get_DOC_RESULTTABLE(vDT_RESULTLIST_OPTIONS As DataTable, vDT_RESULTLIST_SELVALUES As DataTable, DT_WINDREAM_RESULTLIST As DataTable, ENT_ID As Integer, REC_ID As Integer, vType As String, Optional ftString As String = "", Optional BG As Boolean = False, Optional Preload As Boolean = False)
Dim COL_ARRAY_RESULTLIST As List(Of String) Dim COL_ARRAY_RESULTLIST As List(Of String)
ENTITY_ID = ENT_ID ENTITY_ID = ENT_ID
@@ -207,7 +213,7 @@ Public Class ClassDOC_SEARCH
colOtype.Caption = "Objecttype" colOtype.Caption = "Objecttype"
DTGrid.Columns.Add(colOtype) DTGrid.Columns.Add(colOtype)
Dim colDocID As New System.Data.DataColumn() Dim colDocID As New System.Data.DataColumn()
colDocID.DataType = GetType(String) colDocID.DataType = GetType(Int32)
colDocID.ColumnName = "DocID" colDocID.ColumnName = "DocID"
colDocID.Caption = "DocID" colDocID.Caption = "DocID"
DTGrid.Columns.Add(colDocID) DTGrid.Columns.Add(colDocID)

View File

@@ -443,7 +443,7 @@ Partial Class frmConstructorDesigner
Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.BindingSource = Me.TBPMO_FORM_CONSTRUCTORBindingSource Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.BindingSource = Me.TBPMO_FORM_CONSTRUCTORBindingSource
Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.CountItem = Me.BindingNavigatorCountItem Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.CountItem = Me.BindingNavigatorCountItem
Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.CountItemFormat = "from {0} Constructor-Sichten" Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.CountItemFormat = "from {0} Constructor-Sichten"
Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.DeleteItem = Me.BindingNavigatorDeleteItem Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.DeleteItem = Nothing
Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.BindingNavigatorAddNewItem, Me.BindingNavigatorDeleteItem, Me.TBPMO_FORM_CONSTRUCTORBindingNavigatorSaveItem}) Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.BindingNavigatorAddNewItem, Me.BindingNavigatorDeleteItem, Me.TBPMO_FORM_CONSTRUCTORBindingNavigatorSaveItem})
resources.ApplyResources(Me.TBPMO_FORM_CONSTRUCTORBindingNavigator, "TBPMO_FORM_CONSTRUCTORBindingNavigator") resources.ApplyResources(Me.TBPMO_FORM_CONSTRUCTORBindingNavigator, "TBPMO_FORM_CONSTRUCTORBindingNavigator")
Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem Me.TBPMO_FORM_CONSTRUCTORBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem
@@ -1481,6 +1481,7 @@ Partial Class frmConstructorDesigner
Me.TableAdapterManager2.TBPMO_RECORD_LOG_CONFIGTableAdapter = Nothing Me.TableAdapterManager2.TBPMO_RECORD_LOG_CONFIGTableAdapter = Nothing
Me.TableAdapterManager2.TBPMO_RECORDTableAdapter = Nothing Me.TableAdapterManager2.TBPMO_RECORDTableAdapter = Nothing
Me.TableAdapterManager2.TBPMO_RIGHT_GROUPTableAdapter = Nothing Me.TableAdapterManager2.TBPMO_RIGHT_GROUPTableAdapter = Nothing
Me.TableAdapterManager2.TBPMO_RIGHT_USERTableAdapter = Nothing
Me.TableAdapterManager2.TBPMO_STRUCTURE_NODES_CONFIGURATIONTableAdapter = Nothing Me.TableAdapterManager2.TBPMO_STRUCTURE_NODES_CONFIGURATIONTableAdapter = Nothing
Me.TableAdapterManager2.TBPMO_TEMPLATE_ENTITYTableAdapter = Nothing Me.TableAdapterManager2.TBPMO_TEMPLATE_ENTITYTableAdapter = Nothing
Me.TableAdapterManager2.TBPMO_TEMPLATE_PATTERNTableAdapter = Nothing Me.TableAdapterManager2.TBPMO_TEMPLATE_PATTERNTableAdapter = Nothing

File diff suppressed because it is too large Load Diff

View File

@@ -565,7 +565,7 @@
<value>Eigenschaften</value> <value>Eigenschaften</value>
</data> </data>
<data name="ContextMenuStripResultFiles.Size" type="System.Drawing.Size, System.Drawing"> <data name="ContextMenuStripResultFiles.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 342</value> <value>252, 320</value>
</data> </data>
<data name="&gt;&gt;ContextMenuStripResultFiles.Name" xml:space="preserve"> <data name="&gt;&gt;ContextMenuStripResultFiles.Name" xml:space="preserve">
<value>ContextMenuStripResultFiles</value> <value>ContextMenuStripResultFiles</value>

View File

@@ -1946,6 +1946,10 @@ Public Class frmConstructor_Main
Dim result As MsgBoxResult Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then If result = MsgBoxResult.Yes Then
Dim DT_DOC_RESULT As DataTable = ClassDOC_SEARCH.Get_DOCRESULTS(DT_RESULTLIST_OPTIONS, DT_RESULTLIST_VARIABLE_VALUE, DT_WINDREAM_RESULTLIST, ENTITY_ID, "RECORD")
If IsNothing(DT_DOC_RESULT) Then
clsLogger.Add(">> DT_DOC_RESULT is nothing!", True)
End If
If ClassHelper.DeleteRecord(SELECTED_RECORD_ID) = True Then If ClassHelper.DeleteRecord(SELECTED_RECORD_ID) = True Then
RECORD_CHANGED = False RECORD_CHANGED = False
EDIT_STATE = EditState.None EDIT_STATE = EditState.None
@@ -1958,7 +1962,7 @@ Public Class frmConstructor_Main
End If End If
Update_Status_Label(True, msg, EditState.Update) Update_Status_Label(True, msg, EditState.Update)
WD_DELETE_DOCS() WD_DELETE_DOCS(DT_DOC_RESULT)
@@ -3562,16 +3566,15 @@ Public Class frmConstructor_Main
End Sub End Sub
Private Sub WD_DELETE_DOCS() Private Sub WD_DELETE_DOCS(DT_RESULT As Datatable)
Dim sw As New Stopwatch Dim sw As New Stopwatch
sw.Start() sw.Start()
Dim elapsed As Double Dim elapsed As Double
' Dim Basesearch As String ' Dim Basesearch As String
Try Try
Dim DT_RESULT As DataTable = ClassDOC_SEARCH.Get_DOC_RESULTTABLE(DT_RESULTLIST_OPTIONS, DT_RESULTLIST_VARIABLE_VALUE, DT_WINDREAM_RESULTLIST, ENTITY_ID, RECORD_ID, "RECORD") If Not IsNothing(DT_RESULT) Then
If IsNothing(DT_RESULT) Then
Exit Sub
Else
If DT_RESULT.Rows.Count > 0 Then 'Es gibt Suchergebnisse If DT_RESULT.Rows.Count > 0 Then 'Es gibt Suchergebnisse
Dim msg As String Dim msg As String
msg = "Wollen Sie die zugehörigen Dateien (" & DT_RESULT.Rows.Count.ToString & ") ebenfalls löschen?" msg = "Wollen Sie die zugehörigen Dateien (" & DT_RESULT.Rows.Count.ToString & ") ebenfalls löschen?"
@@ -3583,7 +3586,12 @@ Public Class frmConstructor_Main
If result1 = MsgBoxResult.Yes Then If result1 = MsgBoxResult.Yes Then
For Each row As DataRow In DT_RESULT.Rows For Each row As DataRow In DT_RESULT.Rows
Dim DOC_ID = row.Item("DocID") Dim DOC_ID = row.Item("DocID")
Dim path = row.Item("FULLPATH") Dim path
Try
path = row.Item("FULL_FILENAME")
Catch ex As Exception
path = row.Item(1)
End Try
If Not IsNothing(path) Then If Not IsNothing(path) Then
Dim Count As Integer = ClassDatabase.Execute_Scalar("SELECT COUNT(GUID) FROM TBPMO_DOC_RECORD_LINK WHERE DOC_ID = " & DOC_ID) Dim Count As Integer = ClassDatabase.Execute_Scalar("SELECT COUNT(GUID) FROM TBPMO_DOC_RECORD_LINK WHERE DOC_ID = " & DOC_ID)
If Count > 1 Then If Count > 1 Then
@@ -3593,7 +3601,7 @@ Public Class frmConstructor_Main
End If End If
MsgBox(msg, MsgBoxStyle.Information) MsgBox(msg, MsgBoxStyle.Information)
If ClassFileResult.Delete_ResultFile(DOC_ID, RECORD_ID, 0) = False Then If ClassFileResult.Delete_ResultFile(DOC_ID, RECORD_ID, 0) = False Then
ClassHelper.InsertEssential_Log(row.Item("DOC_ID"), "DOC-ID", "FILE LINK DELETED BY USER") ClassHelper.InsertEssential_Log(DOC_ID, "DOC-ID", "FILE LINK DELETED BY USER")
End If End If
Else Else
If ClassFileResult.Delete_ResultFile(DOC_ID, RECORD_ID, 1) = False Then If ClassFileResult.Delete_ResultFile(DOC_ID, RECORD_ID, 1) = False Then
@@ -3604,7 +3612,7 @@ Public Class frmConstructor_Main
MsgBox(msg, MsgBoxStyle.Critical, "Attention:") MsgBox(msg, MsgBoxStyle.Critical, "Attention:")
Else Else
If ClassWindream.Delete_WDFile(path) Then If ClassWindream.Delete_WDFile(path) Then
ClassHelper.InsertEssential_Log(row.Item("DOC_ID"), "DOC-ID", "FILE DELETED BY USER") ClassHelper.InsertEssential_Log(DOC_ID, "DOC-ID", "FILE DELETED BY USER")
End If End If
End If End If
End If End If
@@ -3612,8 +3620,9 @@ Public Class frmConstructor_Main
End If End If
Next Next
End If End If
End If End If
Else
clsLogger.Add(">> No files 2 delete - after deleting record!", False)
End If End If
Cursor = Cursors.Default Cursor = Cursors.Default
Catch ex As Exception Catch ex As Exception

View File

@@ -479,6 +479,7 @@ Partial Class frmUserKonfig
Me.TableAdapterManager.TBPMO_RECORD_LOG_CONFIGTableAdapter = Nothing Me.TableAdapterManager.TBPMO_RECORD_LOG_CONFIGTableAdapter = Nothing
Me.TableAdapterManager.TBPMO_RECORDTableAdapter = Nothing Me.TableAdapterManager.TBPMO_RECORDTableAdapter = Nothing
Me.TableAdapterManager.TBPMO_RIGHT_GROUPTableAdapter = Nothing Me.TableAdapterManager.TBPMO_RIGHT_GROUPTableAdapter = Nothing
Me.TableAdapterManager.TBPMO_RIGHT_USERTableAdapter = Nothing
Me.TableAdapterManager.TBPMO_STRUCTURE_NODES_CONFIGURATIONTableAdapter = Nothing Me.TableAdapterManager.TBPMO_STRUCTURE_NODES_CONFIGURATIONTableAdapter = Nothing
Me.TableAdapterManager.TBPMO_TEMPLATE_ENTITYTableAdapter = Nothing Me.TableAdapterManager.TBPMO_TEMPLATE_ENTITYTableAdapter = Nothing
Me.TableAdapterManager.TBPMO_TEMPLATE_PATTERNTableAdapter = Nothing Me.TableAdapterManager.TBPMO_TEMPLATE_PATTERNTableAdapter = Nothing
@@ -499,7 +500,7 @@ Partial Class frmUserKonfig
Me.TBDD_USERBindingNavigator.BindingSource = Me.TBDD_USERBindingSource Me.TBDD_USERBindingNavigator.BindingSource = Me.TBDD_USERBindingSource
Me.TBDD_USERBindingNavigator.CountItem = Me.BindingNavigatorCountItem Me.TBDD_USERBindingNavigator.CountItem = Me.BindingNavigatorCountItem
Me.TBDD_USERBindingNavigator.CountItemFormat = "von {0} Usern" Me.TBDD_USERBindingNavigator.CountItemFormat = "von {0} Usern"
Me.TBDD_USERBindingNavigator.DeleteItem = Me.BindingNavigatorDeleteItem Me.TBDD_USERBindingNavigator.DeleteItem = Nothing
Me.TBDD_USERBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.BindingNavigatorAddNewItem, Me.BindingNavigatorDeleteItem, Me.TBDD_USERBindingNavigatorSaveItem, Me.tbRefreshUsers, Me.tsAddUser}) Me.TBDD_USERBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.BindingNavigatorAddNewItem, Me.BindingNavigatorDeleteItem, Me.TBDD_USERBindingNavigatorSaveItem, Me.tbRefreshUsers, Me.tsAddUser})
resources.ApplyResources(Me.TBDD_USERBindingNavigator, "TBDD_USERBindingNavigator") resources.ApplyResources(Me.TBDD_USERBindingNavigator, "TBDD_USERBindingNavigator")
Me.TBDD_USERBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem Me.TBDD_USERBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem

File diff suppressed because it is too large Load Diff