Add new SQLEditor

This commit is contained in:
Jonathan Jenne
2022-05-12 11:04:53 +02:00
parent 3b316c43ef
commit 81c8c26a9b
3 changed files with 44 additions and 10 deletions

View File

@@ -518,14 +518,27 @@ Public Class frmAdministration
oSQLCommand = txtManIndexSQL.Text
End If
Dim oForm As New frmSQL_DESIGNER(oIndexGuid, oDocTypeGuid) With {
'Dim oForm As New frmSQL_DESIGNER(oIndexGuid, oDocTypeGuid) With {
' .SQLCommand = oSQLCommand,
' .ConnectionID = oConnection
'}
Dim oDatatable = DATABASE_ECM.GetDatatable($"SELECT * FROM TBDD_INDEX_MAN WHERE DOK_ID = {oDocTypeGuid} AND ACTIVE = 1")
Dim oPlaceholders = oDatatable.AsEnumerable().
ToDictionary(Of String, String)(Function(row) row.Item("NAME"), Function(row) row.Item("WD_INDEX"))
Dim oForm2 As New DigitalData.GUIs.Common.frmSQLEditor(LOGCONFIG, DATABASE_ECM) With {
.SQLCommand = oSQLCommand,
.ConnectionID = oConnection
.SQLConnection = oConnection,
.PlaceholdersManual = oPlaceholders
}
If oForm.ShowDialog() = DialogResult.OK Then
txtManIndexSQL.Text = oForm.SQLCommand
txtManIndexConnectionId.Text = oForm.SQLConnectionId
Dim oResult = oForm2.ShowDialog()
If oResult = DialogResult.OK Then
txtManIndexSQL.Text = oForm2.SQLCommand
txtManIndexConnectionId.Text = oForm2.SQLConnection
End If
Catch ex As Exception
LOGGER.Error(ex)
@@ -630,14 +643,31 @@ Public Class frmAdministration
oSQLCommand = txtAutomIndexSQLResult.Text
End If
Dim oForm As New frmSQL_DESIGNER(oIndexGuid, oDocTypeGuid) With {
'Dim oForm As New frmSQL_DESIGNER(oIndexGuid, oDocTypeGuid) With {
' .SQLCommand = oSQLCommand,
' .ConnectionID = oConnection
'}
'If oForm.ShowDialog() = DialogResult.OK Then
' txtAutomIndexSQLResult.Text = oForm.SQLCommand
' txtAutomIndexConnectionId.Text = oForm.SQLConnectionId
'End If
Dim oDatatable = DATABASE_ECM.GetDatatable($"SELECT * FROM TBDD_INDEX_MAN WHERE DOK_ID = {oDocTypeGuid} AND ACTIVE = 1")
Dim oPlaceholders = oDatatable.AsEnumerable().
ToDictionary(Of String, String)(Function(row) row.Item("NAME"), Function(row) row.Item("WD_INDEX"))
Dim oForm2 As New DigitalData.GUIs.Common.frmSQLEditor(LOGCONFIG, DATABASE_ECM) With {
.SQLCommand = oSQLCommand,
.ConnectionID = oConnection
.SQLConnection = oConnection,
.PlaceholdersManual = oPlaceholders,
.PlaceholdersManualTitle = "Manueller Index"
}
If oForm.ShowDialog() = DialogResult.OK Then
txtAutomIndexSQLResult.Text = oForm.SQLCommand
txtAutomIndexConnectionId.Text = oForm.SQLConnectionId
Dim oResult = oForm2.ShowDialog()
If oResult = DialogResult.OK Then
txtManIndexSQL.Text = oForm2.SQLCommand
txtManIndexConnectionId.Text = oForm2.SQLConnection
End If
Catch ex As Exception
LOGGER.Error(ex)