Common/SQLEditor: Fix bugs, switch to dictionary
This commit is contained in:
@@ -10,8 +10,8 @@ Public Class frmAdmin_Globix
|
||||
Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey
|
||||
Public Property GlobixHelper As ClassGIDatatables
|
||||
|
||||
Private AttributesManual As List(Of String)
|
||||
Private AttributesAutomatic As List(Of String)
|
||||
Private AttributesManual As new Dictionary(Of String, String)
|
||||
Private AttributesAutomatic As New Dictionary(Of String, String)
|
||||
|
||||
Private Pages As ClassDetailPageManager
|
||||
Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False)
|
||||
@@ -120,10 +120,9 @@ Public Class frmAdmin_Globix
|
||||
|
||||
TBDD_INDEX_MANTableAdapter.Fill(GlobixDataset.TBDD_INDEX_MAN, PrimaryKey)
|
||||
|
||||
AttributesManual = GlobixDataset.TBDD_INDEX_MAN.
|
||||
Cast(Of DataRow).
|
||||
Select(Of String)(Function(row) row.Item("NAME")).
|
||||
ToList()
|
||||
AttributesManual = GlobixDataset.TBDD_INDEX_MAN.Cast(Of DataRow).
|
||||
ToDictionary(Of String, String)(Function(row) row.Item("NAME"), Function(row) row.Item("WD_INDEX"))
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in Load IndexeManuell: ")
|
||||
@@ -138,10 +137,8 @@ Public Class frmAdmin_Globix
|
||||
|
||||
TBDD_INDEX_AUTOMTableAdapter.Fill(GlobixDataset.TBDD_INDEX_AUTOM, PrimaryKey)
|
||||
|
||||
AttributesAutomatic = GlobixDataset.TBDD_INDEX_AUTOM.
|
||||
Cast(Of DataRow).
|
||||
Select(Of String)(Function(row) row.Item("NAME")).
|
||||
ToList()
|
||||
AttributesAutomatic = GlobixDataset.TBDD_INDEX_AUTOM.Cast(Of DataRow).
|
||||
ToDictionary(Of String, String)(Function(row) row.Item("NAME"), Function(row) row.Item("WD_INDEX"))
|
||||
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(ex.Message)
|
||||
@@ -354,8 +351,7 @@ Public Class frmAdmin_Globix
|
||||
Dim oForm2 As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With {
|
||||
.SQLCommand = SQL_RESULTTextBox.Text,
|
||||
.SQLConnection = CONNECTION_IDTextBox.Text,
|
||||
.PlaceholdersManual = AttributesManual,
|
||||
.LoadClipboardPlaceholders = True
|
||||
.PlaceholdersManual = AttributesManual
|
||||
}
|
||||
oForm2.ShowDialog()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user