SQLEditor: Minor Tweaks

This commit is contained in:
Jonathan Jenne
2021-04-29 16:08:31 +02:00
parent 81932eaab6
commit c33d5ff340
3 changed files with 39 additions and 39 deletions

View File

@@ -12,17 +12,17 @@ Public Class frmSQLEditor
Private SQLServer As MSSQLServer
Private CurrentPosition As String
Private Placeholders As New List(Of SqlPlaceholder)
Private Connections As New List(Of SqlConnection)
Private Placeholders As New List(Of Placeholder)
Private Connections As New List(Of Connection)
Private Patterns As ClassPatterns
Friend Class SqlPlaceholder
Friend Class Placeholder
Public Property Placeholder As String
Public Property Replacement As String
End Class
Friend Class SqlConnection
Friend Class Connection
Public Property Guid As Integer
Public Property Name As String
Public Property Description As String
@@ -74,10 +74,10 @@ Public Class frmSQLEditor
Try
Dim oSQL As String = "SELECT * FROM TBDD_CONNECTION"
Dim oTable As DataTable = SQLServer.GetDatatable(oSQL)
Dim oConnections As New List(Of SqlConnection)
Dim oConnections As New List(Of Connection)
For Each oRow As DataRow In oTable.Rows
oConnections.Add(New SqlConnection With {
oConnections.Add(New Connection With {
.Guid = NotNull(oRow.Item("GUID"), String.Empty),
.Name = NotNull(oRow.Item("BEZEICHNUNG"), String.Empty),
.Provider = NotNull(oRow.Item("SQL_PROVIDER"), String.Empty),
@@ -92,7 +92,7 @@ Public Class frmSQLEditor
Return oConnections
Catch ex As Exception
ShowErrorMessage(ex)
Return New List(Of SqlConnection)
Return New List(Of Connection)
End Try
End Function
@@ -110,7 +110,7 @@ Public Class frmSQLEditor
Try
Dim oSQL As String = txtSQL.EditValue.ToString
Dim oConnection As SqlConnection = cmbConnections.SelectedItem
Dim oConnection As Connection = cmbConnections.SelectedItem
Dim oConnectionString = SQLServer.GetConnectionString(oConnection.Server, oConnection.Database, oConnection.Username, oConnection.Password)
Dim oTable As DataTable = SQLServer.GetDatatableWithConnection(oSQL, oConnectionString)
@@ -136,7 +136,7 @@ Public Class frmSQLEditor
Placeholders.Clear()
For Each oPattern In Patterns.GetAllPatterns(Text)
Placeholders.Add(New SqlPlaceholder With {
Placeholders.Add(New Placeholder With {
.Placeholder = oPattern.ToString,
.Replacement = ""
})