Reload Indicies when ObjectType changes

This commit is contained in:
Jonathan Jenne 2020-12-11 11:43:34 +01:00
parent 6ed90fa6c1
commit 158c043675

View File

@ -9,6 +9,8 @@ Public Class frmAdministration
Private SourceAttributes As List(Of String)
Private SourceObjectTypes As List(Of String)
Private Current_ObjectType As String = ""
Private GroupToDelete As Integer = Nothing
Private IsInsert As Boolean = False
Dim frmloaded As Boolean = False
@ -300,6 +302,8 @@ Public Class frmAdministration
Private Sub OBJEKTTYPComboBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles OBJEKTTYPComboBox.SelectedIndexChanged
If WINDREAM_DIRECTCheckBox.Checked = True Then
load_WDIndices()
Current_ObjectType = OBJEKTTYPComboBox.Text
End If
End Sub
Sub load_WDIndices()
@ -309,14 +313,14 @@ Public Class frmAdministration
Me.WD_INDEXComboBox.Items.Add("")
Me.INDEXNAME_AutoIndexCMB.Items.Clear()
If SourceAttributes Is Nothing Then
If SourceAttributes Is Nothing Or Current_ObjectType <> OBJEKTTYPComboBox.Text Then
SourceAttributes = WINDREAM.GetIndiciesByObjecttype(OBJEKTTYPComboBox.Text)
End If
If SourceAttributes IsNot Nothing Then
For Each index As String In SourceAttributes
Me.WD_INDEXComboBox.Items.Add(index)
INDEXNAME_AutoIndexCMB.Items.Add(index)
For Each oIndex As String In SourceAttributes
Me.WD_INDEXComboBox.Items.Add(oIndex)
INDEXNAME_AutoIndexCMB.Items.Add(oIndex)
Next
End If
End If