JJ 13.09 ClassWindreamDocGrid
This commit is contained in:
@@ -138,7 +138,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
Private DT_WINDREAM_RESULTLIST_DEF As DataTable
|
||||
Private DT_WINDREAM_RESULTLIST As DataTable
|
||||
Private DT_DOCRESULT_DROPDOWN_ITMES As DataTable
|
||||
Private DT_DOCRESULT_DROPDOWN_ITEMS As DataTable
|
||||
Private DT_RESULTLIST_OPTIONS As DataTable
|
||||
Private DT_WORKFLOWS_MANUAL As DataTable
|
||||
|
||||
@@ -168,11 +168,11 @@ Public Class frmConstructor_Main
|
||||
Private _VIEWNAME As String
|
||||
Private _ENTITYSTRING As String
|
||||
|
||||
Private RESULT_DOC_PATH
|
||||
Private RESULT_OBJECTTYPE
|
||||
Private RESULT_INWORK
|
||||
Private RESULT_DOC_ID
|
||||
Private RESULT_DISPLAYNAME
|
||||
'Private ClassWindreamDocGrid.RESULT_DOC_PATH
|
||||
'Private ClassWindreamDocGrid.RESULT_OBJECTTYPE
|
||||
'Private ClassWindreamDocGrid.RESULT_INWORK
|
||||
'Private ClassWindreamDocGrid.RESULT_DOC_ID
|
||||
'Private ClassWindreamDocGrid.RESULT_DISPLAYNAME
|
||||
|
||||
Private IW_USER As String
|
||||
Private IW_COMMENT As String
|
||||
@@ -2199,7 +2199,7 @@ Public Class frmConstructor_Main
|
||||
Update_Record_Label(SELECTED_RECORD_ID)
|
||||
|
||||
' Dim FORM_TYPE = DT_FORM.Rows(0).Item("FORM_TYPE_ID") 'ClassDatabase.Execute_Scalar("SELECT FORM_TYPE_ID FROM TBPMO_FORM WHERE GUID = " & ENTITY_ID)
|
||||
|
||||
|
||||
'CURRENT_DATE_FORMAT = USER_DATE_FORMAT
|
||||
|
||||
If IS_SINGLE_RECORD = False Then
|
||||
@@ -2374,7 +2374,7 @@ Public Class frmConstructor_Main
|
||||
Lock_RecordControls(True)
|
||||
RECORD_ENABLED = False
|
||||
CURRENT_RECORD_ENABLED = False
|
||||
|
||||
|
||||
Me.tsButtonDelete.Enabled = False
|
||||
Me.tsButtonAdd.Enabled = True
|
||||
Me.tsButtonSave.Enabled = False
|
||||
@@ -2534,7 +2534,7 @@ Public Class frmConstructor_Main
|
||||
Dim sql_ResultList = String.Format("select * from TBPMO_DOCSEARCH_RESULTLIST_CONFIG WHERE VISIBLE = 1 AND ENTITY_ID = {0} AND LANGUAGE = '{1}'", ENTITY_ID, USER_LANGUAGE) 'TBPMO_WINDREAM_RESULTLIST_CONFIG"
|
||||
DT_WINDREAM_RESULTLIST = ClassDatabase.Return_Datatable(sql_ResultList, "GETRESULTLIST KONFIG")
|
||||
sql_ResultList = String.Format("select * from TBPMO_DOCRESULT_DROPDOWN_ITEMS WHERE CONFIG_ID IN (SELECT GUID FROM TBPMO_DOCSEARCH_RESULTLIST_CONFIG WHERE ENTITY_ID = {0} AND TYPE_ID = 4 AND LANGUAGE = '{1}')", ENTITY_ID, USER_LANGUAGE)
|
||||
DT_DOCRESULT_DROPDOWN_ITMES = ClassDatabase.Return_Datatable(sql_ResultList, "GETRESULT_DROPDOWN_ITEMS")
|
||||
DT_DOCRESULT_DROPDOWN_ITEMS = ClassDatabase.Return_Datatable(sql_ResultList, "GETRESULT_DROPDOWN_ITEMS")
|
||||
|
||||
sql_ResultList = String.Format("select * from TBPMO_DOCSEARCH_VARIABLE_CONTROLS WHERE ENTITY_ID = {0}", ENTITY_ID) 'TBPMO_WINDREAM_RESULTLIST_CONFIG"
|
||||
DT_RESULTLIST_OPTIONS = ClassDatabase.Return_Datatable(sql_ResultList, "GETVARIABLE CONTROLS")
|
||||
@@ -4422,142 +4422,153 @@ Public Class frmConstructor_Main
|
||||
|
||||
If DT_RESULT.Rows.Count > 0 Then
|
||||
|
||||
Dim listcheck As New List(Of String)
|
||||
Dim listdate As New List(Of String)
|
||||
Dim DROPDOWN_TABLE As New DataTable
|
||||
DROPDOWN_TABLE.TableName = "DROPDOWN_TABLE"
|
||||
' Create two columns, ID and Name.
|
||||
DROPDOWN_TABLE.Columns.Add("ID", GetType(Integer))
|
||||
DROPDOWN_TABLE.Columns.Add("COLUMN_VIEW", GetType(System.String))
|
||||
For Each rw As DataRow In DT_WINDREAM_RESULTLIST.Rows
|
||||
' Dim Width = rw.Item("WIDTH") 'DT_WINDREAM_RESULTLIST.Rows(0).Item(String.Format("{0}_WIDTH", col.ColumnName))
|
||||
' If Not IsNothing(Width) And Not IsDBNull(Width) Then
|
||||
'Dim column = DirectCast(GridViewDoc_Search.Columns.Item(rw.Item("HEADER_CAPTION")), DevExpress.XtraGrid.Columns.GridColumn)
|
||||
'column.Width = Width
|
||||
'Console.WriteLine("ColumnWidth {0} set to {1}", column.FieldName, Width)
|
||||
'Console.WriteLine("ColumnWidth {0} really set to {1}", column.FieldName, column.VisibleWidth)
|
||||
'End If
|
||||
'Liste von allen Spaltentiteln mit Checkbox erstellen
|
||||
If rw.Item("TYPE_ID") = 2 And CBool(rw.Item("VISIBLE")) = True Then
|
||||
listcheck.Add(rw.Item("HEADER_CAPTION"))
|
||||
End If
|
||||
'Liste von allen Spaltentiteln mit Checkbox erstellen
|
||||
If rw.Item("TYPE_ID") = 3 And CBool(rw.Item("VISIBLE")) = True Then
|
||||
listdate.Add(rw.Item("HEADER_CAPTION"))
|
||||
End If
|
||||
If rw.Item("TYPE_ID") = 4 And CBool(rw.Item("VISIBLE")) = True Then
|
||||
Dim newRow As DataRow = DROPDOWN_TABLE.NewRow()
|
||||
newRow("ID") = rw.Item("GUID")
|
||||
newRow("COLUMN_VIEW") = rw.Item("HEADER_CAPTION")
|
||||
DROPDOWN_TABLE.Rows.Add(newRow)
|
||||
DROPDOWN_TABLE.AcceptChanges()
|
||||
End If
|
||||
ClassWindreamDocGrid.FormatColumns(
|
||||
GridViewDoc_Search,
|
||||
DT_RESULT,
|
||||
DT_WINDREAM_RESULTLIST,
|
||||
DT_DOCRESULT_DROPDOWN_ITEMS,
|
||||
AddressOf OnCBSelectedValueChanged)
|
||||
|
||||
Next
|
||||
|
||||
Dim tbltemp As DataTable = DT_RESULT.Clone()
|
||||
For Each col1 As String In listcheck
|
||||
Dim collist As DataColumn = tbltemp.Columns(col1)
|
||||
If Not IsNothing(collist) Then
|
||||
collist.DataType = GetType(Boolean)
|
||||
End If
|
||||
Next
|
||||
For Each col1 As String In listdate
|
||||
Dim coldate As DataColumn = tbltemp.Columns(col1)
|
||||
If Not IsNothing(coldate) Then
|
||||
coldate.DataType = GetType(Date)
|
||||
End If
|
||||
Next
|
||||
Try
|
||||
tbltemp.Load(DT_RESULT.CreateDataReader)
|
||||
DT_RESULT = tbltemp
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not load converted datatable DocSearch: " & ex.Message, False)
|
||||
End Try
|
||||
GridControlDocSearch.DataSource = DT_RESULT
|
||||
' Alle Date Spalten durchgehen
|
||||
For Each col As String In listdate
|
||||
Dim colDate = GridViewDoc_Search.Columns(col)
|
||||
colDate.DisplayFormat.FormatType = FormatType.DateTime
|
||||
colDate.DisplayFormat.FormatString = CURRENT_DATE_FORMAT
|
||||
Next
|
||||
|
||||
' Alle Date Spalten durchgehen
|
||||
For Each dropdownrow As DataRow In DROPDOWN_TABLE.Rows
|
||||
Dim RepositoryItemComboBox = New RepositoryItemComboBox()
|
||||
Dim colstring = dropdownrow.Item(1)
|
||||
Dim guid = dropdownrow.Item("ID")
|
||||
Dim expression As String
|
||||
expression = "CONFIG_ID = " & guid.ToString
|
||||
Dim foundRows() As DataRow
|
||||
' Use the Select method to find all rows matching the filter.
|
||||
foundRows = DT_DOCRESULT_DROPDOWN_ITMES.Select(expression, "SEQUENCE")
|
||||
|
||||
' For each row add an item
|
||||
For i = 0 To foundRows.GetUpperBound(0)
|
||||
Dim item As New WDDoc_Combobox_Item()
|
||||
item.ConfigID = foundRows(i)("CONFIG_ID")
|
||||
item.Value = foundRows(i)("VALUE")
|
||||
|
||||
|
||||
'RepositoryItemComboBox.Items.Add(foundRows(i)("VALUE"))
|
||||
RepositoryItemComboBox.Items.Add(item)
|
||||
Next
|
||||
GridViewDoc_Search.GridControl.RepositoryItems.Add(RepositoryItemComboBox)
|
||||
If Not IsNothing(GridViewDoc_Search.Columns(colstring)) Then
|
||||
GridViewDoc_Search.Columns(colstring).ColumnEdit = RepositoryItemComboBox
|
||||
End If
|
||||
AddHandler RepositoryItemComboBox.SelectedValueChanged, AddressOf OnCBSelectedValueChanged
|
||||
|
||||
Next
|
||||
'Jetzt die Spaltenbreiten anpassen
|
||||
For Each rw As DataRow In DT_WINDREAM_RESULTLIST.Rows
|
||||
Dim Width = rw.Item("WIDTH") 'DT_WINDREAM_RESULTLIST.Rows(0).Item(String.Format("{0}_WIDTH", col.ColumnName))
|
||||
If Not IsNothing(Width) And Not IsDBNull(Width) Then
|
||||
Dim column = DirectCast(GridViewDoc_Search.Columns.Item(rw.Item("HEADER_CAPTION")), DevExpress.XtraGrid.Columns.GridColumn)
|
||||
column.Width = Width
|
||||
'Console.WriteLine("ColumnWidth {0} set to {1}", column.FieldName, Width)
|
||||
'Console.WriteLine("ColumnWidth {0} really set to {1}", column.FieldName, column.VisibleWidth)
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
' Größe der Icon Column anpassen
|
||||
GridViewDoc_Search.Columns.Item("ICON").MaxWidth = 24
|
||||
GridViewDoc_Search.Columns.Item("ICON").MinWidth = 24
|
||||
GridViewDoc_Search.Columns.Item("FULLPATH").Visible = False
|
||||
GridViewDoc_Search.Columns.Item("OBJECTTYPE").Visible = False
|
||||
GridViewDoc_Search.Columns.Item("DocID").Visible = False
|
||||
Dim changed = "Geändert"
|
||||
Dim created = "Erstellt"
|
||||
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
changed = "Changed"
|
||||
created = "Created"
|
||||
If TCDetails.SelectedTabPageIndex <> 1 Then
|
||||
TCDetails.SelectedTabPageIndex = 1
|
||||
End If
|
||||
Try
|
||||
GridViewDoc_Search.Columns(created).DisplayFormat.FormatType = FormatType.DateTime
|
||||
GridViewDoc_Search.Columns(created).DisplayFormat.FormatString = CURRENT_DATE_FORMAT & " HH:MM:ss"
|
||||
GridViewDoc_Search.Columns(changed).DisplayFormat.FormatType = FormatType.DateTime
|
||||
GridViewDoc_Search.Columns(changed).DisplayFormat.FormatString = CURRENT_DATE_FORMAT & " HH:MM:ss"
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not change datetime formats Change/Create: " & ex.Message, False)
|
||||
End Try
|
||||
|
||||
For Each col As DevExpress.XtraGrid.Columns.GridColumn In GridViewDoc_Search.Columns
|
||||
Dim colu = col
|
||||
Console.Write(colu.Name & " - " & colu.FieldName)
|
||||
Dim _AllowEdit As Boolean = False
|
||||
For Each dropdownrow As DataRow In DROPDOWN_TABLE.Rows
|
||||
Dim colstring = dropdownrow.Item(1)
|
||||
If colstring = colu.FieldName Then
|
||||
_AllowEdit = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
col.OptionsColumn.AllowEdit = _AllowEdit
|
||||
Next
|
||||
'Dim listcheck As New List(Of String)
|
||||
'Dim listdate As New List(Of String)
|
||||
'Dim DROPDOWN_TABLE As New DataTable
|
||||
'DROPDOWN_TABLE.TableName = "DROPDOWN_TABLE"
|
||||
'' Create two columns, ID and Name.
|
||||
'DROPDOWN_TABLE.Columns.Add("ID", GetType(Integer))
|
||||
'DROPDOWN_TABLE.Columns.Add("COLUMN_VIEW", GetType(System.String))
|
||||
'For Each rw As DataRow In DT_WINDREAM_RESULTLIST.Rows
|
||||
' ' Dim Width = rw.Item("WIDTH") 'DT_WINDREAM_RESULTLIST.Rows(0).Item(String.Format("{0}_WIDTH", col.ColumnName))
|
||||
' ' If Not IsNothing(Width) And Not IsDBNull(Width) Then
|
||||
' 'Dim column = DirectCast(GridViewDoc_Search.Columns.Item(rw.Item("HEADER_CAPTION")), DevExpress.XtraGrid.Columns.GridColumn)
|
||||
' 'column.Width = Width
|
||||
' 'Console.WriteLine("ColumnWidth {0} set to {1}", column.FieldName, Width)
|
||||
' 'Console.WriteLine("ColumnWidth {0} really set to {1}", column.FieldName, column.VisibleWidth)
|
||||
' 'End If
|
||||
' 'Liste von allen Spaltentiteln mit Checkbox erstellen
|
||||
' If rw.Item("TYPE_ID") = 2 And CBool(rw.Item("VISIBLE")) = True Then
|
||||
' listcheck.Add(rw.Item("HEADER_CAPTION"))
|
||||
' End If
|
||||
' 'Liste von allen Spaltentiteln mit Checkbox erstellen
|
||||
' If rw.Item("TYPE_ID") = 3 And CBool(rw.Item("VISIBLE")) = True Then
|
||||
' listdate.Add(rw.Item("HEADER_CAPTION"))
|
||||
' End If
|
||||
' If rw.Item("TYPE_ID") = 4 And CBool(rw.Item("VISIBLE")) = True Then
|
||||
' Dim newRow As DataRow = DROPDOWN_TABLE.NewRow()
|
||||
' newRow("ID") = rw.Item("GUID")
|
||||
' newRow("COLUMN_VIEW") = rw.Item("HEADER_CAPTION")
|
||||
' DROPDOWN_TABLE.Rows.Add(newRow)
|
||||
' DROPDOWN_TABLE.AcceptChanges()
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
'Dim tbltemp As DataTable = DT_RESULT.Clone()
|
||||
'For Each col1 As String In listcheck
|
||||
' Dim collist As DataColumn = tbltemp.Columns(col1)
|
||||
' If Not IsNothing(collist) Then
|
||||
' collist.DataType = GetType(Boolean)
|
||||
' End If
|
||||
'Next
|
||||
'For Each col1 As String In listdate
|
||||
' Dim coldate As DataColumn = tbltemp.Columns(col1)
|
||||
' If Not IsNothing(coldate) Then
|
||||
' coldate.DataType = GetType(Date)
|
||||
' End If
|
||||
'Next
|
||||
'Try
|
||||
' tbltemp.Load(DT_RESULT.CreateDataReader)
|
||||
' DT_RESULT = tbltemp
|
||||
'Catch ex As Exception
|
||||
' ClassLogger.Add(">> Attention: Could not load converted datatable DocSearch: " & ex.Message, False)
|
||||
'End Try
|
||||
'GridControlDocSearch.DataSource = DT_RESULT
|
||||
'' Alle Date Spalten durchgehen
|
||||
'For Each col As String In listdate
|
||||
' Dim colDate = GridViewDoc_Search.Columns(col)
|
||||
' colDate.DisplayFormat.FormatType = FormatType.DateTime
|
||||
' colDate.DisplayFormat.FormatString = CURRENT_DATE_FORMAT
|
||||
'Next
|
||||
|
||||
'' Alle Date Spalten durchgehen
|
||||
'For Each dropdownrow As DataRow In DROPDOWN_TABLE.Rows
|
||||
' Dim RepositoryItemComboBox = New RepositoryItemComboBox()
|
||||
' Dim colstring = dropdownrow.Item(1)
|
||||
' Dim guid = dropdownrow.Item("ID")
|
||||
' Dim expression As String
|
||||
' expression = "CONFIG_ID = " & guid.ToString
|
||||
' Dim foundRows() As DataRow
|
||||
' ' Use the Select method to find all rows matching the filter.
|
||||
' foundRows = DT_DOCRESULT_DROPDOWN_ITMES.Select(expression, "SEQUENCE")
|
||||
|
||||
' ' For each row add an item
|
||||
' For i = 0 To foundRows.GetUpperBound(0)
|
||||
' Dim item As New WDDoc_Combobox_Item()
|
||||
' item.ConfigID = foundRows(i)("CONFIG_ID")
|
||||
' item.Value = foundRows(i)("VALUE")
|
||||
|
||||
|
||||
' 'RepositoryItemComboBox.Items.Add(foundRows(i)("VALUE"))
|
||||
' RepositoryItemComboBox.Items.Add(item)
|
||||
' Next
|
||||
' GridViewDoc_Search.GridControl.RepositoryItems.Add(RepositoryItemComboBox)
|
||||
' If Not IsNothing(GridViewDoc_Search.Columns(colstring)) Then
|
||||
' GridViewDoc_Search.Columns(colstring).ColumnEdit = RepositoryItemComboBox
|
||||
' End If
|
||||
' AddHandler RepositoryItemComboBox.SelectedValueChanged, AddressOf OnCBSelectedValueChanged
|
||||
|
||||
'Next
|
||||
''Jetzt die Spaltenbreiten anpassen
|
||||
'For Each rw As DataRow In DT_WINDREAM_RESULTLIST.Rows
|
||||
' Dim Width = rw.Item("WIDTH") 'DT_WINDREAM_RESULTLIST.Rows(0).Item(String.Format("{0}_WIDTH", col.ColumnName))
|
||||
' If Not IsNothing(Width) And Not IsDBNull(Width) Then
|
||||
' Dim column = DirectCast(GridViewDoc_Search.Columns.Item(rw.Item("HEADER_CAPTION")), DevExpress.XtraGrid.Columns.GridColumn)
|
||||
' column.Width = Width
|
||||
' 'Console.WriteLine("ColumnWidth {0} set to {1}", column.FieldName, Width)
|
||||
' 'Console.WriteLine("ColumnWidth {0} really set to {1}", column.FieldName, column.VisibleWidth)
|
||||
' End If
|
||||
|
||||
|
||||
'Next
|
||||
|
||||
'' Größe der Icon Column anpassen
|
||||
'GridViewDoc_Search.Columns.Item("ICON").MaxWidth = 24
|
||||
'GridViewDoc_Search.Columns.Item("ICON").MinWidth = 24
|
||||
'GridViewDoc_Search.Columns.Item("FULLPATH").Visible = False
|
||||
'GridViewDoc_Search.Columns.Item("OBJECTTYPE").Visible = False
|
||||
'GridViewDoc_Search.Columns.Item("DocID").Visible = False
|
||||
'Dim changed = "Geändert"
|
||||
'Dim created = "Erstellt"
|
||||
|
||||
'If USER_LANGUAGE <> "de-DE" Then
|
||||
' changed = "Changed"
|
||||
' created = "Created"
|
||||
'End If
|
||||
'Try
|
||||
' GridViewDoc_Search.Columns(created).DisplayFormat.FormatType = FormatType.DateTime
|
||||
' GridViewDoc_Search.Columns(created).DisplayFormat.FormatString = CURRENT_DATE_FORMAT & " HH:MM:ss"
|
||||
' GridViewDoc_Search.Columns(changed).DisplayFormat.FormatType = FormatType.DateTime
|
||||
' GridViewDoc_Search.Columns(changed).DisplayFormat.FormatString = CURRENT_DATE_FORMAT & " HH:MM:ss"
|
||||
'Catch ex As Exception
|
||||
' ClassLogger.Add(">> Attention: Could not change datetime formats Change/Create: " & ex.Message, False)
|
||||
'End Try
|
||||
|
||||
'For Each col As DevExpress.XtraGrid.Columns.GridColumn In GridViewDoc_Search.Columns
|
||||
' Dim colu = col
|
||||
' Console.Write(colu.Name & " - " & colu.FieldName)
|
||||
' Dim _AllowEdit As Boolean = False
|
||||
' For Each dropdownrow As DataRow In DROPDOWN_TABLE.Rows
|
||||
' Dim colstring = dropdownrow.Item(1)
|
||||
' If colstring = colu.FieldName Then
|
||||
' _AllowEdit = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' col.OptionsColumn.AllowEdit = _AllowEdit
|
||||
'Next
|
||||
|
||||
|
||||
|
||||
@@ -4574,10 +4585,10 @@ Public Class frmConstructor_Main
|
||||
'Next
|
||||
'grvwGrid.Columns("Record-ID").OptionsColumn.AllowShowHide = False
|
||||
|
||||
If TCDetails.SelectedTabPageIndex <> 1 Then
|
||||
'If TCDetails.SelectedTabPageIndex <> 1 Then
|
||||
|
||||
TCDetails.SelectedTabPageIndex = 1
|
||||
End If
|
||||
' TCDetails.SelectedTabPageIndex = 1
|
||||
'End If
|
||||
|
||||
|
||||
End If
|
||||
@@ -4619,10 +4630,10 @@ Public Class frmConstructor_Main
|
||||
Dim ComboBox As ComboBoxEdit = sender
|
||||
'Dim ItemComboBox As RepositoryItemComboBox
|
||||
'ItemComboBox = sender
|
||||
Dim item As WDDoc_Combobox_Item = ComboBox.SelectedItem
|
||||
Dim item As ClassWindreamDocGrid.WindreamDocGridComboboxItem = ComboBox.SelectedItem
|
||||
Dim value As String = item.Value
|
||||
Dim configId As Integer = item.ConfigID
|
||||
Dim docId As Integer = RESULT_DOC_ID
|
||||
Dim docId As Integer = ClassWindreamDocGrid.RESULT_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, Environment.UserName)
|
||||
@@ -4860,7 +4871,7 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
|
||||
Private Sub TCDetails_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles TCDetails.SelectedPageChanged
|
||||
|
||||
|
||||
Update_Status_Label(False, "")
|
||||
'tsButtonEdit.Enabled = True
|
||||
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("pos") Then
|
||||
@@ -5865,11 +5876,11 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
|
||||
Private Sub KopierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CopyToolStripMenuItem.Click
|
||||
If RESULT_DOC_PATH <> Nothing Then
|
||||
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
|
||||
Try
|
||||
Dim selectedfile(0) As String
|
||||
|
||||
selectedfile(0) = RESULT_DOC_PATH
|
||||
selectedfile(0) = ClassWindreamDocGrid.RESULT_DOC_PATH
|
||||
|
||||
Dim dataobj As New DataObject
|
||||
|
||||
@@ -5885,38 +5896,8 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
|
||||
Private Sub GridViewDoc_Search_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs) Handles GridViewDoc_Search.FocusedRowChanged
|
||||
Get_Doc_Items()
|
||||
End Sub
|
||||
Sub Get_Doc_Items()
|
||||
Try
|
||||
RESULT_DOC_PATH = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("FULLPATH"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not set DocVariable RESULT_DOC_PATH: " & ex.Message, False)
|
||||
RESULT_DOC_PATH = Nothing
|
||||
End Try
|
||||
Try
|
||||
RESULT_OBJECTTYPE = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("OBJECTTYPE"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not set DocVariable RESULT_OBJECTTYPE: " & ex.Message, False)
|
||||
RESULT_OBJECTTYPE = ""
|
||||
End Try
|
||||
Try
|
||||
RESULT_INWORK = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("in work?"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not set DocVariable RESULT_INWORK: " & ex.Message, False)
|
||||
RESULT_INWORK = ""
|
||||
End Try
|
||||
Try
|
||||
RESULT_DOC_ID = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("DocID"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not set DocVariable RESULT_DOC_ID: " & ex.Message, False)
|
||||
RESULT_DOC_ID = Nothing
|
||||
End Try
|
||||
Try
|
||||
RESULT_DISPLAYNAME = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("Displayname"))
|
||||
Catch ex As Exception
|
||||
RESULT_DISPLAYNAME = ""
|
||||
End Try
|
||||
'Get_Doc_Items()
|
||||
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
||||
End Sub
|
||||
|
||||
Private Sub LöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem.Click
|
||||
@@ -5924,7 +5905,7 @@ Public Class frmConstructor_Main
|
||||
MsgBox("Please select a record!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
If RESULT_DOC_PATH <> Nothing Then
|
||||
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 USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Would You like to delete only the references?" & vbNewLine & "File will stay in ECM/Archive/Explorer!"
|
||||
@@ -5933,15 +5914,15 @@ Public Class frmConstructor_Main
|
||||
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 = '" & RESULT_OBJECTTYPE & "'")
|
||||
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(RESULT_DOC_PATH, DT_INDICES.Rows(0).Item("IDXNAME_RECORDID"), RECORD_ID) = True Then
|
||||
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(RESULT_DOC_PATH, DT_INDICES.Rows(0).Item("IDXNAME_ENTITYID"), ENTITY_ID) = True Then
|
||||
If ClassFileResult.Delete_ResultFile(RESULT_DOC_ID) = True Then
|
||||
ClassHelper.InsertEssential_Log(RESULT_DOC_ID, "DOC-ID", "RECORD LINK REMOVED FROM DOC-SEARCH")
|
||||
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")
|
||||
End If
|
||||
Else
|
||||
@@ -5960,12 +5941,12 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
|
||||
Private Sub EigenschaftenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PropertiesToolStripMenuItem.Click
|
||||
If RESULT_DOC_PATH <> Nothing Then
|
||||
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 = RESULT_DOC_PATH
|
||||
sei.lpFile = ClassWindreamDocGrid.RESULT_DOC_PATH
|
||||
sei.nShow = SW_SHOW
|
||||
sei.fMask = SEE_MASK_INVOKEIDLIST
|
||||
If Not ShellExecuteEx(sei) Then
|
||||
@@ -5977,12 +5958,13 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
|
||||
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateiÖffnenToolStripMenuItem.Click
|
||||
ClassHelper.File_open(RESULT_DOC_PATH, RESULT_DOC_ID)
|
||||
ClassHelper.File_open(ClassWindreamDocGrid.RESULT_DOC_PATH, ClassWindreamDocGrid.RESULT_DOC_ID)
|
||||
End Sub
|
||||
Private Sub GridControlDocSearch_DoubleClick(sender As Object, e As EventArgs) Handles GridControlDocSearch.DoubleClick
|
||||
Get_Doc_Items()
|
||||
'Get_Doc_Items()
|
||||
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
||||
If RIGHT_WINDREAM_FORBIDDEN = False Then
|
||||
ClassHelper.File_open(RESULT_DOC_PATH, RESULT_DOC_ID)
|
||||
ClassHelper.File_open(ClassWindreamDocGrid.RESULT_DOC_PATH, ClassWindreamDocGrid.RESULT_DOC_ID)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -6249,11 +6231,11 @@ Public Class frmConstructor_Main
|
||||
Try
|
||||
If tsTextBoxRenameFile.Text <> "" Then
|
||||
Dim OldName, NewName As String
|
||||
OldName = RESULT_DOC_PATH
|
||||
OldName = ClassWindreamDocGrid.RESULT_DOC_PATH
|
||||
' Define file names.
|
||||
NewName = tsTextBoxRenameFile.Text
|
||||
Dim name1 = Path.Combine(Path.GetDirectoryName(RESULT_DOC_PATH), NewName)
|
||||
NewName = NewName & Path.GetExtension(RESULT_DOC_PATH)
|
||||
Dim name1 = Path.Combine(Path.GetDirectoryName(ClassWindreamDocGrid.RESULT_DOC_PATH), NewName)
|
||||
NewName = NewName & Path.GetExtension(ClassWindreamDocGrid.RESULT_DOC_PATH)
|
||||
' Rename file.
|
||||
My.Computer.FileSystem.RenameFile(OldName, NewName)
|
||||
RUN_WDSEARCH_GRID("RECORD")
|
||||
@@ -6273,9 +6255,9 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
Sub Display_Filename()
|
||||
Try
|
||||
If RESULT_DOC_PATH <> "" Then
|
||||
If ClassWindreamDocGrid.RESULT_DOC_PATH <> "" Then
|
||||
Dim FileToRename As String
|
||||
FileToRename = Path.GetFileNameWithoutExtension(RESULT_DOC_PATH)
|
||||
FileToRename = Path.GetFileNameWithoutExtension(ClassWindreamDocGrid.RESULT_DOC_PATH)
|
||||
tsTextBoxRenameFile.Text = FileToRename
|
||||
tsTextBoxRenameFile.Enabled = True
|
||||
Else
|
||||
@@ -6287,18 +6269,18 @@ 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 = RESULT_DOC_PATH
|
||||
CURRENT_DOC_ID = RESULT_DOC_ID
|
||||
Dim frm As New frmWD_Link_to_Record(fileName, RESULT_OBJECTTYPE)
|
||||
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()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DetailAnsichtDatensatzToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DetailAnsichtDatensatzToolStripMenuItem.Click
|
||||
ClassJumpRecord.JumpToRecord(0, RECORD_ID)
|
||||
JUMP_RECORD_ID = 0
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub EntitätssucheStartenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EntitätssucheStartenToolStripMenuItem.Click
|
||||
RUN_WDSEARCH_GRID("ENTITY")
|
||||
End Sub
|
||||
@@ -6334,7 +6316,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
Private Sub ContextMenuStripResultFiles_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripResultFiles.Opening
|
||||
File_in_Work()
|
||||
If RESULT_DISPLAYNAME <> "" Then
|
||||
If ClassWindreamDocGrid.RESULT_DISPLAYNAME <> "" Then
|
||||
TSMIDisplayname.Visible = True
|
||||
Set_Displayname()
|
||||
Else
|
||||
@@ -6345,7 +6327,7 @@ Public Class frmConstructor_Main
|
||||
TSMI_inWork.Enabled = True
|
||||
Try
|
||||
Dim expression As String
|
||||
expression = "DocID = " & RESULT_DOC_ID
|
||||
expression = "DocID = " & ClassWindreamDocGrid.RESULT_DOC_ID
|
||||
Dim foundRowsLevel0() As DataRow
|
||||
' Use the Select method to find all rows matching the filter.
|
||||
foundRowsLevel0 = CURRENT_DOC_RESULTS.Select(expression)
|
||||
@@ -6361,7 +6343,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
Dim displ As String
|
||||
|
||||
If CBool(RESULT_INWORK) = True Then
|
||||
If CBool(ClassWindreamDocGrid.RESULT_INWORK) = True Then
|
||||
If IW_USER.ToUpper = Environment.UserName.ToUpper Then
|
||||
displ = "Datei wieder freigeben"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
@@ -6386,8 +6368,8 @@ 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 = RESULT_DOC_ID
|
||||
If RESULT_INWORK = True Then ' Datei ist in Bearbeitung
|
||||
ClassFileResult.DocID = ClassWindreamDocGrid.RESULT_DOC_ID
|
||||
If ClassWindreamDocGrid.RESULT_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
|
||||
@@ -6402,15 +6384,17 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
Else
|
||||
frmFileInWork.ShowDialog()
|
||||
RESULT_INWORK = ClassFileResult.InWork
|
||||
ClassWindreamDocGrid.RESULT_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()
|
||||
'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
|
||||
@@ -6437,8 +6421,8 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
Sub Set_Displayname()
|
||||
Try
|
||||
If RESULT_DISPLAYNAME <> "" Then
|
||||
tstbDisplayname.Text = RESULT_DISPLAYNAME
|
||||
If ClassWindreamDocGrid.RESULT_DISPLAYNAME <> "" Then
|
||||
tstbDisplayname.Text = ClassWindreamDocGrid.RESULT_DISPLAYNAME
|
||||
tstbDisplayname.Enabled = True
|
||||
Else
|
||||
tstbDisplayname.Enabled = False
|
||||
@@ -6448,13 +6432,13 @@ Public Class frmConstructor_Main
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub tstbDisplayname_KeyUp(sender As Object, e As KeyEventArgs) Handles tstbDisplayname.KeyUp
|
||||
If e.KeyCode = Keys.Return Then
|
||||
Try
|
||||
ClassFileResult.DocID = RESULT_DOC_ID
|
||||
ClassFileResult.DocID = ClassWindreamDocGrid.RESULT_DOC_ID
|
||||
If tstbDisplayname.Text <> "" Then
|
||||
|
||||
|
||||
If ClassFileResult.Set_Displayname(tstbDisplayname.Text) Then
|
||||
RUN_WDSEARCH_GRID("RECORD")
|
||||
ContextMenuStripResultFiles.Close()
|
||||
@@ -6469,7 +6453,7 @@ 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(RESULT_DOC_ID, RESULT_DOC_PATH, ENTITY_ID) = True Then
|
||||
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
|
||||
@@ -6518,34 +6502,34 @@ Public Class frmConstructor_Main
|
||||
MsgBox("Please select a record!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
If RESULT_DOC_PATH <> Nothing Then
|
||||
Dim msg = "Sind Sie sicher, dass Sie die Datei " & vbNewLine & RESULT_DOC_PATH & vbNewLine & "endgültig löschen wollen?"
|
||||
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 & RESULT_DOC_PATH
|
||||
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(RESULT_DOC_ID) Then
|
||||
If ClassWindream.Delete_WDFile(RESULT_DOC_PATH) = True Then
|
||||
If ClassFileResult.Delete_ResultFile(RESULT_DOC_ID) = True Then
|
||||
ClassHelper.InsertEssential_Log(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!", RESULT_DOC_PATH)
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = String.Format("The file {0} could not be deleted! Check the logfile!", RESULT_DOC_PATH)
|
||||
End If
|
||||
MsgBox(msg, MsgBoxStyle.Critical, "Attention:")
|
||||
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)
|
||||
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
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user