jj navigation
This commit is contained in:
parent
0d321282c6
commit
bd5d829b1e
34
app/DD-Record-Organiser/XtraForm2.Designer.vb
generated
34
app/DD-Record-Organiser/XtraForm2.Designer.vb
generated
@ -22,7 +22,7 @@ Partial Class XtraForm2
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(XtraForm2))
|
||||
Me.navPane = New DevExpress.XtraBars.Navigation.TileNavPane()
|
||||
Me.NavButton2 = New DevExpress.XtraBars.Navigation.NavButton()
|
||||
Me.btn_home = New DevExpress.XtraBars.Navigation.NavButton()
|
||||
Me.btn_Refresh = New DevExpress.XtraBars.Navigation.NavButton()
|
||||
Me.TreeViewLevelSelect = New System.Windows.Forms.TreeView()
|
||||
Me.GridControlSelection = New DevExpress.XtraGrid.GridControl()
|
||||
@ -30,7 +30,7 @@ Partial Class XtraForm2
|
||||
Me.BindingSource_Entity = New System.Windows.Forms.BindingSource(Me.components)
|
||||
Me.StatusStrip_Main = New System.Windows.Forms.StatusStrip()
|
||||
Me.tssStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.tssEntity = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.tssRecord = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.ContextMenu_GridControlSelection = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.FunktionenDatagridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
@ -62,7 +62,7 @@ Partial Class XtraForm2
|
||||
'navPane
|
||||
'
|
||||
Me.navPane.ButtonPadding = New System.Windows.Forms.Padding(12)
|
||||
Me.navPane.Buttons.Add(Me.NavButton2)
|
||||
Me.navPane.Buttons.Add(Me.btn_home)
|
||||
Me.navPane.Buttons.Add(Me.btn_Refresh)
|
||||
'
|
||||
'TileNavCategory1
|
||||
@ -84,13 +84,13 @@ Partial Class XtraForm2
|
||||
Me.navPane.TabIndex = 0
|
||||
Me.navPane.Text = "TileNavPane1"
|
||||
'
|
||||
'NavButton2
|
||||
'btn_home
|
||||
'
|
||||
Me.NavButton2.AllowGlyphSkinning = DevExpress.Utils.DefaultBoolean.[True]
|
||||
Me.NavButton2.Caption = ""
|
||||
Me.NavButton2.Glyph = CType(resources.GetObject("NavButton2.Glyph"), System.Drawing.Image)
|
||||
Me.NavButton2.IsMain = True
|
||||
Me.NavButton2.Name = "NavButton2"
|
||||
Me.btn_home.AllowGlyphSkinning = DevExpress.Utils.DefaultBoolean.[True]
|
||||
Me.btn_home.Caption = ""
|
||||
Me.btn_home.Glyph = CType(resources.GetObject("btn_home.Glyph"), System.Drawing.Image)
|
||||
Me.btn_home.IsMain = True
|
||||
Me.btn_home.Name = "btn_home"
|
||||
'
|
||||
'btn_Refresh
|
||||
'
|
||||
@ -132,7 +132,7 @@ Partial Class XtraForm2
|
||||
'
|
||||
'StatusStrip_Main
|
||||
'
|
||||
Me.StatusStrip_Main.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tssStatus, Me.tssEntity})
|
||||
Me.StatusStrip_Main.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tssStatus, Me.tssRecord})
|
||||
Me.StatusStrip_Main.Location = New System.Drawing.Point(0, 637)
|
||||
Me.StatusStrip_Main.Name = "StatusStrip_Main"
|
||||
Me.StatusStrip_Main.Size = New System.Drawing.Size(1460, 22)
|
||||
@ -145,11 +145,11 @@ Partial Class XtraForm2
|
||||
Me.tssStatus.Size = New System.Drawing.Size(121, 17)
|
||||
Me.tssStatus.Text = "ToolStripStatusLabel1"
|
||||
'
|
||||
'tssEntity
|
||||
'tssRecord
|
||||
'
|
||||
Me.tssEntity.Name = "tssEntity"
|
||||
Me.tssEntity.Size = New System.Drawing.Size(121, 17)
|
||||
Me.tssEntity.Text = "ToolStripStatusLabel1"
|
||||
Me.tssRecord.Name = "tssRecord"
|
||||
Me.tssRecord.Size = New System.Drawing.Size(121, 17)
|
||||
Me.tssRecord.Text = "ToolStripStatusLabel1"
|
||||
'
|
||||
'ContextMenu_GridControlSelection
|
||||
'
|
||||
@ -213,7 +213,7 @@ Partial Class XtraForm2
|
||||
'XtraTabPage2
|
||||
'
|
||||
Me.XtraTabPage2.Name = "XtraTabPage2"
|
||||
Me.XtraTabPage2.Size = New System.Drawing.Size(294, 274)
|
||||
Me.XtraTabPage2.Size = New System.Drawing.Size(1044, 384)
|
||||
Me.XtraTabPage2.Text = "XtraTabPage2"
|
||||
'
|
||||
'SplitContainer_Main
|
||||
@ -288,7 +288,7 @@ Partial Class XtraForm2
|
||||
|
||||
End Sub
|
||||
Friend WithEvents navPane As DevExpress.XtraBars.Navigation.TileNavPane
|
||||
Friend WithEvents NavButton2 As DevExpress.XtraBars.Navigation.NavButton
|
||||
Friend WithEvents btn_home As DevExpress.XtraBars.Navigation.NavButton
|
||||
Friend WithEvents btn_Refresh As DevExpress.XtraBars.Navigation.NavButton
|
||||
Friend WithEvents TreeViewLevelSelect As System.Windows.Forms.TreeView
|
||||
Friend WithEvents GridControlSelection As DevExpress.XtraGrid.GridControl
|
||||
@ -296,7 +296,7 @@ Partial Class XtraForm2
|
||||
Friend WithEvents BindingSource_Entity As System.Windows.Forms.BindingSource
|
||||
Friend WithEvents StatusStrip_Main As System.Windows.Forms.StatusStrip
|
||||
Friend WithEvents tssStatus As System.Windows.Forms.ToolStripStatusLabel
|
||||
Friend WithEvents tssEntity As System.Windows.Forms.ToolStripStatusLabel
|
||||
Friend WithEvents tssRecord As System.Windows.Forms.ToolStripStatusLabel
|
||||
Friend WithEvents ContextMenu_GridControlSelection As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents FunktionenDatagridToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
|
||||
|
||||
@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="NavButton2.Glyph" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="btn_home.Glyph" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAALdEVYdFRpdGxlAEhvbWU7HnRkOAAAAWlJREFUWEfF
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraBars.Navigation
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
|
||||
Public Class XtraForm2
|
||||
|
||||
@ -9,9 +10,10 @@ Public Class XtraForm2
|
||||
Public EBENE2_PARENT_ID As Integer
|
||||
Public EBENE3_PARENT_ID As Integer
|
||||
Public ACT_EBENE As Integer
|
||||
Public ACT_EBENE_STRING
|
||||
Public SelectedRecordID As Integer
|
||||
Public PARENT_RECORDID As Integer
|
||||
Public ACT_EBENE_STRING
|
||||
|
||||
Public EBENE1_ENTITY
|
||||
Public EBENE2_ENTITY
|
||||
Public EBENE3_ENTITY
|
||||
@ -35,16 +37,203 @@ Public Class XtraForm2
|
||||
Update
|
||||
End Enum
|
||||
|
||||
|
||||
Private Sub XtraForm2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
CONSTRUCTORID = CURRENT_CONSTRUCTOR_ID
|
||||
DT_CONSTRUCT_VIEW = ClassDatabase.Return_Datatable("SELECT * FROM TBPMO_FORM_CONSTRUCTOR WHERE GUID = " & CONSTRUCTORID)
|
||||
|
||||
Load_Tree_View()
|
||||
'Load_Tree_View()
|
||||
Load_Tree_View(CONSTRUCTORID)
|
||||
End Sub
|
||||
|
||||
Public Sub Update_Status(visible As Boolean, Optional text As String = "", Optional state As EditState = EditState.None)
|
||||
#Region "NavPane"
|
||||
|
||||
|
||||
Private Function FindNode(tncoll As TreeNodeCollection, strText As [String]) As TreeNode
|
||||
Dim tnFound As TreeNode
|
||||
For Each tnCurr As TreeNode In tncoll
|
||||
If tnCurr.Text.StartsWith(strText) Then
|
||||
Return tnCurr
|
||||
End If
|
||||
tnFound = FindNode(tnCurr.Nodes, strText)
|
||||
If tnFound IsNot Nothing Then
|
||||
Return tnFound
|
||||
End If
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub navPane_MouseUp(sender As Object, e As MouseEventArgs) Handles navPane.MouseUp
|
||||
Dim pane As TileNavPane = TryCast(sender, TileNavPane)
|
||||
Dim hitInfo As TileNavPaneHitInfo = pane.ViewInfo.CalcHitInfo(e.Location)
|
||||
If hitInfo.InButton Then
|
||||
Dim element = hitInfo.ButtonInfo.Element
|
||||
navPane.HideDropDownWindow()
|
||||
|
||||
If TypeOf element Is NavButton Then
|
||||
Dim btn As NavButton = TryCast(element, NavButton)
|
||||
|
||||
If btn.IsMain Then ResetNav()
|
||||
Else
|
||||
Dim Entity As String = element.Tag
|
||||
Dim Node = FindNode(TreeViewLevelSelect.Nodes, Entity)
|
||||
|
||||
TreeViewLevelSelect.SelectedNode = Node
|
||||
Load_Tree_View_Data()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ResetNav()
|
||||
navPane.Categories.Clear()
|
||||
TreeViewLevelSelect.SelectedNode = TreeViewLevelSelect.Nodes(0)
|
||||
Load_Tree_View_Data()
|
||||
End Sub
|
||||
|
||||
Private Function LoadLevel1Nav()
|
||||
Dim cat As New TileNavCategory()
|
||||
cat.Caption = EBENE1_GRID_RESULT
|
||||
cat.Name = EBENE1_GRID_RESULT
|
||||
cat.TileText = EBENE1_GRID_RESULT
|
||||
cat.Tag = EBENE1_ENTITY
|
||||
|
||||
navPane.SelectedElement = cat
|
||||
|
||||
Return cat
|
||||
End Function
|
||||
|
||||
Private Function LoadLevel2Nav()
|
||||
Dim item As New TileNavItem()
|
||||
item.Caption = EBENE2_GRID_RESULT
|
||||
item.Name = EBENE2_GRID_RESULT
|
||||
item.TileText = EBENE2_GRID_RESULT
|
||||
item.Tag = EBENE2_ENTITY
|
||||
|
||||
navPane.SelectedElement = item
|
||||
|
||||
Return item
|
||||
End Function
|
||||
|
||||
Private Function LoadLevel3Nav()
|
||||
Dim subitem As New TileNavSubItem()
|
||||
subitem.Caption = EBENE3_GRID_RESULT
|
||||
subitem.Name = EBENE3_GRID_RESULT
|
||||
subitem.TileText = EBENE3_GRID_RESULT
|
||||
subitem.Tag = EBENE3_ENTITY
|
||||
|
||||
navPane.SelectedElement = subitem
|
||||
|
||||
Return subitem
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "TreeView"
|
||||
|
||||
Sub Load_Tree_View(ConstructorId As Integer)
|
||||
|
||||
Dim LEVEL1_NODE As TreeNode
|
||||
Dim LEVEL2_NODE As TreeNode
|
||||
Dim LEVEL3_NODE As TreeNode
|
||||
Dim SQL As String
|
||||
Dim DT, DT2, DT3 As DataTable
|
||||
|
||||
' Daten für Root Node Laden
|
||||
SQL = "SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE PARENT_ID = 0 AND CONSTRUCT_ID = " & ConstructorId & " ORDER BY SEQUENCE"
|
||||
DT = ClassDatabase.Return_Datatable(SQL)
|
||||
|
||||
If DT Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DT.Rows.Count = 1 Then
|
||||
Dim LEVEL1_TITLE = DT.Rows(0).Item("FORM_TITLE").ToString
|
||||
Dim LEVEL1_ID = DT.Rows(0).Item("FORM_ID").ToString
|
||||
|
||||
' Rootnode erstellen und taggen
|
||||
LEVEL1_NODE = New TreeNode(LEVEL1_TITLE)
|
||||
LEVEL1_NODE.Tag = LEVEL1_ID
|
||||
|
||||
' TreeView leeren und Rootnode einfügen
|
||||
TreeViewLevelSelect.Nodes.Clear()
|
||||
TreeViewLevelSelect.Nodes.Add(LEVEL1_NODE)
|
||||
|
||||
' Daten für Level1 Nodes Laden
|
||||
SQL = String.Format("SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = {0} AND PARENT_ID = {1} ORDER BY SEQUENCE", ConstructorId, LEVEL1_ID)
|
||||
DT2 = ClassDatabase.Return_Datatable(SQL)
|
||||
|
||||
If DT2 Is Nothing Or DT2.Rows.Count = 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each row As DataRow In DT2.Rows
|
||||
Dim LEVEL2_TITLE As String = row.Item("FORM_TITLE").ToString
|
||||
Dim LEVEL2_ID As Integer = row.Item("FORM_ID")
|
||||
Dim LEVEL2_PARENT_ID As Integer = row.Item("PARENT_ID")
|
||||
|
||||
' Node erstellen..
|
||||
LEVEL2_NODE = New TreeNode(LEVEL2_TITLE)
|
||||
LEVEL2_NODE.Tag = LEVEL2_ID
|
||||
' ..und einfügen
|
||||
LEVEL1_NODE.Nodes.Add(LEVEL2_NODE)
|
||||
|
||||
' Daten für Level2 Nodes laden
|
||||
SQL = String.Format("SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = {0} AND PARENT_ID = {1} ORDER BY SEQUENCE", ConstructorId, LEVEL2_ID)
|
||||
DT3 = ClassDatabase.Return_Datatable(SQL)
|
||||
|
||||
If DT3 Is Nothing Or DT3.Rows.Count = 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each subrow As DataRow In DT3.Rows
|
||||
Dim LEVEL3_TITLE As String = subrow.Item("FORM_TITLE")
|
||||
Dim LEVEL3_ID As Integer = subrow.Item("FORM_ID")
|
||||
|
||||
' Node erstellen..
|
||||
LEVEL3_NODE = New TreeNode(LEVEL3_TITLE)
|
||||
LEVEL3_NODE.Tag = LEVEL3_ID
|
||||
' ..und einfügen
|
||||
LEVEL2_NODE.Nodes.Add(LEVEL3_NODE)
|
||||
Next
|
||||
|
||||
Next
|
||||
|
||||
TreeViewLevelSelect.ExpandAll()
|
||||
TreeViewLevelSelect.Nodes(0).EnsureVisible()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub Load_Tree_View_Data()
|
||||
Dim SelectedNode As TreeNode = TryCast(TreeViewLevelSelect.SelectedNode, TreeNode)
|
||||
Dim FormId As Integer = SelectedNode.Tag
|
||||
|
||||
If SelectedNode IsNot Nothing Then
|
||||
Dim parentNode As TreeNode = TryCast(SelectedNode.Parent, TreeNode)
|
||||
|
||||
ACT_EBENE = 2
|
||||
|
||||
If parentNode IsNot Nothing Then
|
||||
Dim grandParentNode As TreeNode = TryCast(parentNode.Parent, TreeNode)
|
||||
|
||||
If grandParentNode IsNot Nothing Then
|
||||
ACT_EBENE = 3
|
||||
End If
|
||||
Else
|
||||
ACT_EBENE = 1
|
||||
End If
|
||||
|
||||
Load_Entity_Data(FormId, ACT_EBENE)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Status Bar"
|
||||
|
||||
Public Sub Update_Status_Label(visible As Boolean, Optional text As String = "", Optional state As EditState = EditState.None)
|
||||
tssStatus.Text = text
|
||||
tssStatus.Visible = visible
|
||||
|
||||
@ -58,98 +247,26 @@ Public Class XtraForm2
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Public Sub Update_Record_Label(RecordId As Integer)
|
||||
Dim SQL As String = "SELECT 'Added by ' + ADDED_WHO + ' when ' + CONVERT(VARCHAR(16),ADDED_WHEN,20) + ', Changed by ' + COALESCE(CHANGED_WHO,'') + ' when ' + COALESCE(CONVERT(VARCHAR(16),CHANGED_WHEN,20),'') FROM TBPMO_RECORD WHERE GUID = " & RecordId
|
||||
Dim result = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
Sub Load_Tree_View()
|
||||
Try
|
||||
Dim sql As String = "SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE PARENT_ID = 0 AND CONSTRUCT_ID = " & CONSTRUCTORID & " ORDER BY SEQUENCE"
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
Dim GRANDFATHERNODE1 As TreeNode
|
||||
Dim GRANDFATHERNODE2 As TreeNode
|
||||
Dim FATHERNODE As TreeNode
|
||||
If dt Is Nothing Then
|
||||
MsgBox("No Result for Level 1-Entities - Check logfile", MsgBoxStyle.Exclamation)
|
||||
If IsDBNull(result) Or IsNothing(result) Then
|
||||
tssRecord.Visible = False
|
||||
Else
|
||||
If CURRENT_FORM_TYPE = 5 Then
|
||||
tssRecord.Text = String.Format("Group-Record ({0}) - {1}", RecordId, result.ToString)
|
||||
Else
|
||||
If dt.Rows.Count = 1 Then
|
||||
TreeViewLevelSelect.Nodes.Clear()
|
||||
GRANDFATHERNODE1 = TreeViewLevelSelect.Nodes.Add(dt.Rows(0).Item("FORM_TITLE").ToString)
|
||||
GRANDFATHERNODE1.Tag = dt.Rows(0).Item("FORM_ID")
|
||||
'Ebene 2 Entities herausfinden
|
||||
sql = "SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = " & CONSTRUCTORID & " AND PARENT_ID = " & GRANDFATHERNODE1.Tag & " ORDER BY SEQUENCE"
|
||||
dt = ClassDatabase.Return_Datatable(sql)
|
||||
If dt Is Nothing Then
|
||||
MsgBox("No Result for Level 2-Entities - Check logfile", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
If dt.Rows.Count = 0 Then
|
||||
'tslblStatusMain_show(True, "No Result for Level 2-Entities")
|
||||
' MsgBox("Not allowed: No Result for Level 2-Entities! Check Config FormConstructor.", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
For Each rowentity2 As DataRow In dt.Rows
|
||||
FATHERNODE = GRANDFATHERNODE1.Nodes.Add(rowentity2.Item("FORM_TITLE").ToString)
|
||||
FATHERNODE.Tag = rowentity2.Item("FORM_ID")
|
||||
EBENE2_PARENT_ID = dt.Rows(0).Item("PARENT_ID")
|
||||
'Ebene 3 Entities herausfinden
|
||||
Dim DT3 As DataTable
|
||||
sql = "SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = " & CONSTRUCTORID & " AND PARENT_ID = " & FATHERNODE.Tag & " ORDER BY SEQUENCE"
|
||||
DT3 = ClassDatabase.Return_Datatable(sql)
|
||||
If DT3 Is Nothing Then
|
||||
MsgBox("No Result for Level 3-Entities - Check logfile", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
For Each rowEntity3 As DataRow In DT3.Rows
|
||||
Dim CHILDNODE As TreeNode = FATHERNODE.Nodes.Add(rowEntity3.Item("FORM_TITLE").ToString)
|
||||
CHILDNODE.Tag = rowEntity3.Item("FORM_ID")
|
||||
EBENE3_PARENT_ID = rowEntity3.Item("PARENT_ID")
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
ElseIf dt.Rows.Count = 2 Then
|
||||
TreeViewLevelSelect.Nodes.Clear()
|
||||
GRANDFATHERNODE1 = TreeViewLevelSelect.Nodes.Add(dt.Rows(0).Item("FORM_TITLE").ToString)
|
||||
GRANDFATHERNODE1.Tag = dt.Rows(0).Item("FORM_ID")
|
||||
GRANDFATHERNODE2 = TreeViewLevelSelect.Nodes.Add(dt.Rows(1).Item("FORM_TITLE").ToString)
|
||||
GRANDFATHERNODE2.Tag = dt.Rows(1).Item("FORM_ID")
|
||||
Else
|
||||
MsgBox("More than 2 results #(" & dt.Rows.Count & ") for Level 1-Entities!", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
TreeViewLevelSelect.ExpandAll()
|
||||
TreeViewLevelSelect.Nodes(0).EnsureVisible()
|
||||
tssRecord.Text = String.Format("Record ({0}) - {1}", RecordId, result.ToString)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load TreeView Ebene:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Sub Load_Tree_View_Data()
|
||||
ACT_EBENE = 0
|
||||
If Not TreeViewLevelSelect.SelectedNode Is Nothing Then
|
||||
Try
|
||||
Dim selnode As TreeNode = TreeViewLevelSelect.SelectedNode
|
||||
If (selnode.Parent IsNot Nothing) Then
|
||||
If (selnode.Parent.GetType() Is GetType(TreeNode)) Then
|
||||
ACT_EBENE = 2
|
||||
|
||||
Dim pnode As TreeNode = selnode.Parent
|
||||
If (pnode.Parent IsNot Nothing) Then
|
||||
If (selnode.Parent.GetType() Is GetType(TreeNode)) Then
|
||||
ACT_EBENE = 3
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
ACT_EBENE = 1
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Get ACT_EBENE:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Tag (FormID) After Select: " & TreeViewLevelSelect.SelectedNode.Tag.ToString, False)
|
||||
Load_Entity_Data(TreeViewLevelSelect.SelectedNode.Tag)
|
||||
tssRecord.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub Load_Entity_Data(FormId As Integer)
|
||||
#End Region
|
||||
|
||||
|
||||
Sub Load_Entity_Data(FormId As Integer, CurrentLevel As Integer)
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
|
||||
@ -170,7 +287,7 @@ Public Class XtraForm2
|
||||
'dataloaded = False
|
||||
'Abhängig von der Entität die Selektierungs-Daten laden
|
||||
Dim _sql As String
|
||||
Select Case ACT_EBENE
|
||||
Select Case CurrentLevel
|
||||
Case 1
|
||||
PARENT_RECORDID = 0
|
||||
CURRENT_PARENTID = 0
|
||||
@ -269,8 +386,6 @@ Public Class XtraForm2
|
||||
Exit Sub
|
||||
End If
|
||||
EBENE3_GRID_RESULT = Nothing
|
||||
Case 4
|
||||
|
||||
End Select
|
||||
|
||||
CURRENT_FORM_ID = FormId
|
||||
@ -411,9 +526,9 @@ Public Class XtraForm2
|
||||
GridControlSelection.DataSource = BindingSource_Entity
|
||||
|
||||
' Den Editor Initialisieren und Optionen setzen
|
||||
'CheckBoxEditorForDisplay = New RepositoryItemCheckEdit()
|
||||
'CheckBoxEditorForDisplay.ValueChecked = 1
|
||||
'CheckBoxEditorForDisplay.ValueUnchecked = 0
|
||||
Dim CheckBoxEditorForDisplay = New RepositoryItemCheckEdit()
|
||||
CheckBoxEditorForDisplay.ValueChecked = 1
|
||||
CheckBoxEditorForDisplay.ValueUnchecked = 0
|
||||
|
||||
' Alle Checkbox Spalten durchgehen und CheckBoxEditor zuweisen
|
||||
'For Each col As String In listcheck
|
||||
@ -442,7 +557,7 @@ Public Class XtraForm2
|
||||
|
||||
End Function
|
||||
|
||||
Sub SelectedRecord_ShowData(GridColumn_String As String, Optional DirectRecID As Integer = 0)
|
||||
Sub Show_Selected_Record_Data(GridColumn_String As String, Optional DirectRecID As Integer = 0)
|
||||
Try
|
||||
'Me.pnlDetails.Visible = True
|
||||
'ZeigeRecordLogsToolStripMenuItem.Enabled = False
|
||||
@ -492,13 +607,10 @@ Public Class XtraForm2
|
||||
EBENE1_GRID_RESULT = Get_GridResult(EBENE1_COLUMNNAME)
|
||||
|
||||
|
||||
'---
|
||||
Dim cat As TileNavCategory = LoadLevel1Nav()
|
||||
navPane.Categories.Clear()
|
||||
navPane.Categories.Add(cat)
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Case 2
|
||||
EBENE2_RECID = SelectedRecordID
|
||||
@ -617,7 +729,7 @@ Public Class XtraForm2
|
||||
Select Case EDIT_STATE
|
||||
Case EditState.None
|
||||
'Ganz normalerDatensatzwechsel Wechsel
|
||||
SelectedRecord_ShowData("Record-ID")
|
||||
Show_Selected_Record_Data("Record-ID")
|
||||
'Refresh_Treeview_SelectedData()
|
||||
'tslblStatusMain_show(False, "")
|
||||
Case EditState.Insert
|
||||
@ -646,105 +758,13 @@ Public Class XtraForm2
|
||||
|
||||
'If FOLLOW_UPisActive = True Then Refresh_FollowUp_TabHeader()
|
||||
'Refresh_CreatedChangedRecordByID(SelectedRecordID)
|
||||
Anzeige_Selected_Entity()
|
||||
'Anzeige_Selected_Entity()
|
||||
'Show_act_WFTask()
|
||||
'Get_RecordCounts_Nodes()
|
||||
|
||||
'Refresh_TaskOverview()
|
||||
End Sub
|
||||
|
||||
Private Sub Anzeige_Selected_Entity()
|
||||
'Try
|
||||
' 'Me.tslblEntity1.Visible = False
|
||||
' 'Me.tslblEntity2.Visible = False
|
||||
' 'Me.tslblEntity3.Visible = False
|
||||
' tslblEntity.Text = ""
|
||||
' 'TileControl1.Groups(0).Items.Clear()
|
||||
' Select Case ACT_EBENE
|
||||
' Case 1
|
||||
' tslblEntity.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT
|
||||
' 'tslblEntity1.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT
|
||||
' 'Me.tslblEntity1.Visible = True
|
||||
' pnlNavButtons.Controls.Clear()
|
||||
' Create_NavButton(1, EBENE1_GRID_RESULT)
|
||||
' Case 2
|
||||
' If CURRENT_FORM_TYPE = 5 Then
|
||||
' tslblEntity.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT & " #### Gruppen-Entität: " & EBENE2_ENTITY
|
||||
' 'tslblEntity1.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT
|
||||
' 'tslblEntity2.Text = "Gruppen-Entität: " & EBENE2_ENTITY
|
||||
' 'Me.tslblEntity1.Visible = True
|
||||
' 'Me.tslblEntity2.Visible = True
|
||||
' pnlNavButtons.Controls.Clear()
|
||||
' Create_NavButton(1, EBENE1_GRID_RESULT)
|
||||
' Create_NavButton(2, EBENE2_ENTITY)
|
||||
|
||||
' Exit Sub
|
||||
' End If
|
||||
' If EBENE1_GRID_RESULT Is Nothing = False Then
|
||||
' tslblEntity.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT & " #### " & EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT
|
||||
' 'tslblEntity1.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT
|
||||
' pnlNavButtons.Controls.Clear()
|
||||
' Create_NavButton(1, EBENE1_GRID_RESULT)
|
||||
' Create_NavButton(2, EBENE2_GRID_RESULT)
|
||||
|
||||
|
||||
' 'Me.tslblEntity1.Visible = True
|
||||
' 'Me.tslblEntity2.Visible = True
|
||||
' Else
|
||||
' ' tslblEntity1.Text = EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT
|
||||
' tslblEntity.Text = EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT
|
||||
' 'Me.tslblEntity1.Visible = True
|
||||
' Create_NavButton(1, EBENE2_GRID_RESULT)
|
||||
' End If
|
||||
' Case 3
|
||||
' If CURRENT_FORM_TYPE = 5 Then
|
||||
' 'tslblEntity1.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT
|
||||
' 'tslblEntity2.Text = EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT
|
||||
' 'tslblEntity3.Text = "Gruppen-Entität: " & EBENE3_GRID_RESULT
|
||||
' pnlNavButtons.Controls.Clear()
|
||||
' Create_NavButton(1, EBENE1_GRID_RESULT)
|
||||
' Create_NavButton(2, EBENE2_ENTITY)
|
||||
' Create_NavButton(3, EBENE3_ENTITY)
|
||||
|
||||
' 'Me.tslblEntity1.Visible = True
|
||||
' 'Me.tslblEntity2.Visible = True
|
||||
' 'Me.tslblEntity3.Visible = True
|
||||
' Exit Sub
|
||||
' End If
|
||||
' If EBENE1_GRID_RESULT Is Nothing = False Then
|
||||
' 'tslblEntity1.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT
|
||||
' 'tslblEntity2.Text = EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT
|
||||
' 'tslblEntity3.Text = EBENE3_ENTITY & " - " & EBENE3_GRID_RESULT
|
||||
' tslblEntity.Text = EBENE1_ENTITY & " - " & EBENE1_GRID_RESULT & " #### " & EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT & _
|
||||
' " #### " & EBENE3_ENTITY & " - " & EBENE3_GRID_RESULT
|
||||
' 'Me.tslblEntity1.Visible = True
|
||||
' 'Me.tslblEntity2.Visible = True
|
||||
' 'Me.tslblEntity3.Visible = True
|
||||
' pnlNavButtons.Controls.Clear()
|
||||
' Create_NavButton(1, EBENE1_GRID_RESULT)
|
||||
' Create_NavButton(2, EBENE2_GRID_RESULT)
|
||||
' Create_NavButton(3, EBENE3_GRID_RESULT)
|
||||
|
||||
|
||||
' Else
|
||||
' 'tslblEntity1.Text = EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT
|
||||
' 'tslblEntity2.Text = EBENE3_ENTITY & " - " & EBENE3_GRID_RESULT
|
||||
' tslblEntity.Text = EBENE2_ENTITY & " - " & EBENE2_GRID_RESULT & " #### " & EBENE3_ENTITY & " - " & EBENE3_GRID_RESULT
|
||||
' ' Me.tslblEntity1.Visible = True
|
||||
' 'Me.tslblEntity2.Visible = True
|
||||
' pnlNavButtons.Controls.Clear()
|
||||
' Create_NavButton(1, EBENE2_GRID_RESULT)
|
||||
' Create_NavButton(2, EBENE3_GRID_RESULT)
|
||||
|
||||
' End If
|
||||
' End Select
|
||||
|
||||
'Catch ex As Exception
|
||||
' MsgBox("Error in Anzeige_Selected_Entity:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
'End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TreeViewEbeneSelect_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles TreeViewLevelSelect.AfterSelect
|
||||
Load_Tree_View_Data()
|
||||
End Sub
|
||||
@ -753,41 +773,9 @@ Public Class XtraForm2
|
||||
Load_Tree_View_Data()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Function LoadLevel1Nav()
|
||||
Dim cat As New TileNavCategory()
|
||||
cat.Caption = EBENE1_GRID_RESULT
|
||||
cat.Name = EBENE1_GRID_RESULT
|
||||
cat.TileText = EBENE1_GRID_RESULT
|
||||
|
||||
navPane.SelectedElement = cat
|
||||
|
||||
Return cat
|
||||
End Function
|
||||
|
||||
Private Function LoadLevel2Nav()
|
||||
Dim item As New TileNavItem()
|
||||
item.Caption = EBENE2_GRID_RESULT
|
||||
item.Name = EBENE2_GRID_RESULT
|
||||
item.TileText = EBENE2_GRID_RESULT
|
||||
|
||||
navPane.SelectedElement = item
|
||||
|
||||
Return item
|
||||
End Function
|
||||
|
||||
Private Function LoadLevel3Nav()
|
||||
Dim subitem As New TileNavSubItem()
|
||||
subitem.Caption = EBENE3_GRID_RESULT
|
||||
subitem.Name = EBENE3_GRID_RESULT
|
||||
subitem.TileText = EBENE3_GRID_RESULT
|
||||
|
||||
navPane.SelectedElement = subitem
|
||||
|
||||
Return subitem
|
||||
End Function
|
||||
Private Sub btn_home_ElementClick(sender As Object, e As NavElementEventArgs) Handles btn_home.ElementClick
|
||||
Load_Tree_View(CURRENT_CONSTRUCTOR_ID)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user