This commit is contained in:
SchreiberM
2016-09-22 14:58:28 +02:00
parent 8a7c16d022
commit d8817e84a8
6 changed files with 513 additions and 635 deletions

View File

@@ -502,10 +502,10 @@ Public Class frmConstructor_Main
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGrid.Name, GetSafeFilename(EntityName), CONSTRUCTORID)
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
End Function
Private Function Get_DocGRid_Layout_Filename()
Private Function Get_DocGrid_Layout_Filename()
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", GridViewDoc_Search.Name, GetSafeFilename(EntityName), CONSTRUCTORID)
Dim Filename As String = String.Format("GridViewDoc_Search-{0}-{1}-UserLayout.xml", GetSafeFilename(EntityName), CONSTRUCTORID)
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
End Function
#End Region
@@ -3823,15 +3823,14 @@ Public Class frmConstructor_Main
Try
'Dim sql = "SELECT * FROM TBPMO_FORM_VIEW WHERE WINDREAM_SEARCH <> '' AND GUID = " & FORM_VIEW_ID
'Dim DTWD As DataTable = ClassDatabase.Return_Datatable(sql)
Dim wdsearch = DT_TBPMO_FORM_VIEW.Rows(0).Item("WINDREAM_SEARCH")
If IsDBNull(wdsearch) Then
Dim wdsearch = DT_TBPMO_FORM_VIEW.Rows(0).Item("DOCUMENT_VIEW")
If CBool(wdsearch) = False Then
windream_Docshow = False
TabWindream.PageVisible = False
WindreamsucheNeuLadenToolStripMenuItem.Enabled = False
EntitätssucheStartenToolStripMenuItem.Enabled = False
Exit Sub
End If
If wdsearch <> "" Then
Else
TabWindream.PageVisible = True
'If IsDBNull(DTWD.Rows(0).Item(0)) Then
' windream_Docshow = False
@@ -3854,12 +3853,6 @@ Public Class frmConstructor_Main
sw.Reset()
If LogErrorsOnly = False Then ClassLogger.Add(" >> Windream init took " & Format(elapsed, "0.000000000") & " seconds", False)
End If
Else
windream_Docshow = False
TabWindream.PageVisible = False
WindreamsucheNeuLadenToolStripMenuItem.Enabled = False
EntitätssucheStartenToolStripMenuItem.Enabled = False
End If
Catch ex As Exception
MsgBox("Error in Check windream show:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
@@ -4419,20 +4412,23 @@ Public Class frmConstructor_Main
If USER_LANGUAGE <> "de-DE" Then
msg = "windream-files for entity: " & Entitystring
End If
msg &= " (" & DT_RESULT.Rows.Count.ToString & ")"
Else
If NODE_NAVIGATION Then
If NODE_TEXT.Contains(" (") Then
NODE_TEXT = NODE_TEXT.Substring(0, NODE_TEXT.IndexOf("(") - 1)
End If
msg = "Dateien für Objekt: " & NODE_TEXT
msg = String.Format("Dateien für Objekt '{0}' ", NODE_TEXT)
If USER_LANGUAGE <> "de-DE" Then
msg = "Files for Object: " & NODE_TEXT
msg = String.Format("Files for Object '{0}'", NODE_TEXT)
End If
msg &= " (" & DT_RESULT.Rows.Count.ToString & ")"
Else
msg = "Dateien für Record: " & RECORD_ID
msg = String.Format("Dateien für Record '{0}' ", RECORD_ID)
If USER_LANGUAGE <> "de-DE" Then
msg = "Files for record: " & RECORD_ID
msg = String.Format("Files for record '{0}'", RECORD_ID)
End If
msg &= " (" & DT_RESULT.Rows.Count.ToString & ")"
End If
End If
@@ -4453,165 +4449,6 @@ Public Class frmConstructor_Main
If TCDetails.SelectedTabPageIndex <> 1 Then
TCDetails.SelectedTabPageIndex = 1
End If
'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
'' Den Editor Initialisieren und Optionen setzen
'Dim CheckBoxEditorForDisplay = New RepositoryItemCheckEdit()
'CheckBoxEditorForDisplay.ValueChecked = "True"
'CheckBoxEditorForDisplay.ValueUnchecked = "False"
''Alle Checkbox Spalten durchgehen und CheckBoxEditor zuweisen
'For Each col As String In listcheck
' GridViewDoc_Search.GridControl.RepositoryItems.Add(CheckBoxEditorForDisplay)
' If Not IsNothing(GridViewDoc_Search.Columns(col)) Then
' GridViewDoc_Search.Columns(col).ColumnEdit = CheckBoxEditorForDisplay
' End If
'Next
'grvwGrid.Columns("Record-ID").OptionsColumn.AllowShowHide = False
'If TCDetails.SelectedTabPageIndex <> 1 Then
' TCDetails.SelectedTabPageIndex = 1
'End If
End If
Else
Dim selnode As TreeNode = TreeViewMain.SelectedNode