Common/SQLEditor: Fix bugs, switch to dictionary
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows.Forms
|
||||
Imports DevExpress.XtraBars.Ribbon
|
||||
Imports DevExpress.XtraRichEdit.Services
|
||||
Imports DigitalData.Modules.Database
|
||||
@@ -14,15 +15,16 @@ Public Class frmSQLEditor
|
||||
|
||||
Private ClearPlaceholdersAfterSuccessfulExecute As Boolean = False
|
||||
Private FormLoading As Boolean = False
|
||||
Private FormResult As DialogResult = DialogResult.Cancel
|
||||
|
||||
Public Property SQLCommand As String = ""
|
||||
Public Property SQLConnection As Integer = 0
|
||||
Public Property LoadClipboardPlaceholders As Boolean = False
|
||||
|
||||
Public Property PlaceholdersManual As List(Of String)
|
||||
Public Property PlaceholdersManual As Dictionary(Of String, String)
|
||||
Public Property PlaceholdersManualPrefix As String
|
||||
|
||||
Public Property PlaceholdersAutomatic As List(Of String)
|
||||
Public Property PlaceholdersAutomatic As Dictionary(Of String, String)
|
||||
Public Property PlaceholdersAutomaticPrefix As String
|
||||
|
||||
Public Property PlaceholdersWindream As List(Of String)
|
||||
@@ -42,11 +44,11 @@ Public Class frmSQLEditor
|
||||
FormLoading = True
|
||||
Try
|
||||
If PlaceholdersAutomatic Is Nothing Then
|
||||
PlaceholdersAutomatic = New List(Of String)
|
||||
PlaceholdersAutomatic = New Dictionary(Of String, String)
|
||||
End If
|
||||
|
||||
If PlaceholdersManual Is Nothing Then
|
||||
PlaceholdersManual = New List(Of String)
|
||||
PlaceholdersManual = New Dictionary(Of String, String)
|
||||
End If
|
||||
|
||||
If PlaceholdersWindream Is Nothing Then
|
||||
@@ -126,7 +128,7 @@ Public Class frmSQLEditor
|
||||
|
||||
Private Function LoadConnections() As GalleryItemGroup
|
||||
Try
|
||||
Dim oSql = "SELECT GUID, Bezeichnung FROM [DD_ECM].[dbo].[TBDD_CONNECTION] WHERE AKTIV = 1"
|
||||
Dim oSql = "SELECT GUID, Bezeichnung FROM TBDD_CONNECTION WHERE AKTIV = 1"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
Dim oConnections = New List(Of Connection)
|
||||
|
||||
@@ -263,6 +265,7 @@ Public Class frmSQLEditor
|
||||
|
||||
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick
|
||||
SQLCommand = txtSQLCommand.Text
|
||||
FormResult = DialogResult.OK
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
@@ -271,4 +274,9 @@ Public Class frmSQLEditor
|
||||
ExecuteSQL()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmSQLEditor_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
DialogResult = FormResult
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user