MS Anpassungen Structure Nodes etc
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
' Node erstellen..
|
||||
Dim NEW_NODE As TreeNode
|
||||
NEW_NODE = New TreeNode(nodetext9)
|
||||
ClassNodeNavigation.Check_NODE_CONFIG_ID(LevelEntity9)
|
||||
ClassNodeNavigation.Check_NODE_CONFIG_ID(LevelEntity9, NEW_NODE)
|
||||
NEW_NODE.Tag = ClassNodeNavigation.CreateNODE_TAG(LevelEntity9, ID9, RECORD_ID, NODE_CONFIG_ID)
|
||||
|
||||
Dim index = 0
|
||||
@@ -35,18 +35,44 @@
|
||||
ParentNode.Nodes.Add(NEW_NODE)
|
||||
Next '
|
||||
End Function
|
||||
Public Shared Sub Check_NODE_CONFIG_ID(ENTITY_ID As Integer)
|
||||
Public Shared Sub Check_NODE_CONFIG_ID(ENTITY_ID As Integer, myTreeNode As TreeNode)
|
||||
Try
|
||||
If CURRENT_DT_NODE_CONFIGURABLE_NODES.Rows.Count > 0 Then
|
||||
'Prüfen ob es für dieses Level einen konfigurierbaren Knoten gibt
|
||||
Dim result = (From form In CURRENT_DT_NODE_CONFIGURABLE_NODES.AsEnumerable()
|
||||
Select form
|
||||
Where form.Item("ENTITY_ID") = ENTITY_ID).Single()
|
||||
If myTreeNode Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim NODE_ID
|
||||
Dim staticListItems = myTreeNode.Tag.Split("#")
|
||||
If staticListItems(0).Contains("NODE-TYPE") Then
|
||||
NODE_ID = staticListItems(0).ToString.Replace("NODE-TYPE-", "")
|
||||
|
||||
|
||||
End If
|
||||
If CURRENT_DT_NODE_CONFIGURABLE_NODES.Rows.Count > 0 And IsNumeric(NODE_ID) Then
|
||||
'Prüfen ob es für dieses Level einen konfigurierbaren Knoten gibt
|
||||
Dim table As DataTable = CURRENT_DT_NODE_CONFIGURABLE_NODES
|
||||
' Get rows with PARENT_ID = NODE_ID
|
||||
Dim result() As DataRow = table.Select("PARENT_NODE = " & NODE_ID)
|
||||
Dim count As Integer
|
||||
Dim ID
|
||||
' Loop.
|
||||
For Each row As DataRow In result
|
||||
count += 1
|
||||
ID = row.Item("GUID")
|
||||
CURRENT_NODE_IMAGE = row.Item("NODE_IMAGE")
|
||||
If count = 2 Then Exit For
|
||||
Console.WriteLine(row(0))
|
||||
Next
|
||||
|
||||
'Dim result = (From form In CURRENT_DT_NODE_CONFIGURABLE_NODES.AsEnumerable()
|
||||
' Select form
|
||||
' Where form.Item("PARENT_NODE") = NODE_ID).Single()
|
||||
|
||||
|
||||
Dim ID = result.Item("GUID")
|
||||
If Not IsNothing(ID) Then
|
||||
ClassNodeNavigation.NODE_CONFIGURABLE_ID = ID
|
||||
CURRENT_NODE_CONFIGURABLE_ID = ID
|
||||
Else
|
||||
CURRENT_NODE_CONFIGURABLE_ID = 0
|
||||
End If
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add("NO CURRENT_DT_NODE_CONFIGURABLE_NODES", False)
|
||||
@@ -92,14 +118,16 @@
|
||||
For i = 0 To MAIN_NODES.GetUpperBound(0)
|
||||
If ENTITY_ID <> MAIN_NODES(i)("ENTITY_ID") Then
|
||||
ENTITY_ID = MAIN_NODES(i)("ENTITY_ID")
|
||||
ClassNodeNavigation.Check_NODE_CONFIG_ID(MAIN_NODES(i)("ENTITY_ID"))
|
||||
ClassNodeNavigation.Check_NODE_CONFIG_ID(MAIN_NODES(i)("ENTITY_ID"), Nothing)
|
||||
End If
|
||||
|
||||
Dim NODE_Tag = CreateNODE_TAG(MAIN_NODES(i)("ENTITY_ID"), MAIN_NODES(i)("GUID"), MAIN_NODES(i)("RECORD_ID"), MAIN_NODES(i)("NODE_CONFIG_ID"))
|
||||
Dim MAIN_NODE = New TreeNode(MAIN_NODES(i)("NODE_CAPTION")) '"NODE_CAPTION"
|
||||
MAIN_NODE.Tag = NODE_Tag
|
||||
Dim index As Integer = 0
|
||||
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
|
||||
If img = MAIN_NODES(i)("NODE_CONFIG_ID") & "#" & MAIN_NODES(i)("ENTITY_ID") Then
|
||||
|
||||
If img = MAIN_NODES(i)("NODE_CONFIG_ID") Then ' & "#" & MAIN_NODES(i)("ENTITY_ID")
|
||||
Exit For
|
||||
End If
|
||||
index += 1
|
||||
@@ -139,14 +167,24 @@
|
||||
For i = 0 To SUB_NODE_ROW.GetUpperBound(0)
|
||||
If ENTITY_ID <> SUB_NODE_ROW(i)("ENTITY_ID") Then
|
||||
ENTITY_ID = SUB_NODE_ROW(i)("ENTITY_ID")
|
||||
ClassNodeNavigation.Check_NODE_CONFIG_ID(SUB_NODE_ROW(i)("ENTITY_ID"))
|
||||
ClassNodeNavigation.Check_NODE_CONFIG_ID(SUB_NODE_ROW(i)("ENTITY_ID"), MY_NODE)
|
||||
End If
|
||||
Dim NODE_Tag = CreateNODE_TAG(SUB_NODE_ROW(i)("ENTITY_ID"), SUB_NODE_ROW(i)("GUID"), SUB_NODE_ROW(i)("RECORD_ID"), SUB_NODE_ROW(i)("NODE_CONFIG_ID"))
|
||||
If SUB_NODE_ROW(i)("NODE_CAPTION").ToString.Contains("Neuer") Then
|
||||
Console.WriteLine(SUB_NODE_ROW(i)("NODE_CAPTION"))
|
||||
End If
|
||||
Dim SUB_NODE = New TreeNode(SUB_NODE_ROW(i)("NODE_CAPTION"))
|
||||
SUB_NODE.Tag = NODE_Tag
|
||||
Dim index As Integer = 0
|
||||
For Each img As String In TREEVIEW_IMAGELIST.Images.Keys
|
||||
If img = SUB_NODE_ROW(i)("NODE_CONFIG_ID") & "#" & SUB_NODE_ROW(i)("ENTITY_ID") Then
|
||||
For Each imgkey As String In TREEVIEW_IMAGELIST.Images.Keys
|
||||
If SUB_NODE_ROW(i)("NODE_CONFIG_ID") = "34" Then
|
||||
Console.WriteLine(SUB_NODE_ROW(i)("NODE_CONFIG_ID"))
|
||||
|
||||
End If
|
||||
Dim NODE_CONFIG_ID = SUB_NODE_ROW(i)("NODE_CONFIG_ID")
|
||||
|
||||
If imgkey = SUB_NODE_ROW(i)("NODE_CONFIG_ID") Then '& "#" & SUB_NODE_ROW(i)("ENTITY_ID")
|
||||
'found the key for this node
|
||||
Exit For
|
||||
End If
|
||||
index += 1
|
||||
|
||||
Reference in New Issue
Block a user