Übergabe WM Indexe an SQL Admin

This commit is contained in:
Developer01
2025-04-23 09:33:44 +02:00
parent cb00f0f96d
commit a5a0d1898a
3 changed files with 128 additions and 133 deletions

View File

@@ -503,50 +503,7 @@ Public Class frmAdministration
End Select
End Sub
Private Sub btnSQLView_Click(sender As Object, e As EventArgs) Handles btnSQLView.Click
Dim oIndexGuid As Integer = GUIDTextBox1.Text
Dim oDocTypeGuid As Integer = DOKART_GUIDTextBox.Text
Try
Dim oConnection As Integer = 1
Dim oSQLCommand = ""
If txtManIndexConnectionId.Text <> String.Empty Then
oConnection = txtManIndexConnectionId.Text
End If
If txtManIndexSQL.Text <> String.Empty Then
oSQLCommand = txtManIndexSQL.Text
End If
'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("NAME"))
Dim oForm2 As New DigitalData.GUIs.Common.frmSQLEditor(LOGCONFIG, DATABASE_ECM) With {
.SQLCommand = oSQLCommand,
.SQLConnection = oConnection,
.PlaceholdersManual = oPlaceholders,
.PlaceholdersManualPrefix = "CTRL",
.PlaceholdersWindream = SourceAttributes
}
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)
End Try
End Sub
Private Sub WINDREAM_DIRECTCheckBox_CheckedChanged(sender As Object, e As EventArgs) Handles WINDREAM_DIRECTCheckBox.CheckedChanged
WM_CHECKED_CHANGE()
@@ -665,7 +622,8 @@ Public Class frmAdministration
.SQLConnection = oConnection,
.PlaceholdersManual = oPlaceholders,
.PlaceholdersManualTitle = "Manueller Index",
.PlaceholdersManualPrefix = "CTRL"
.PlaceholdersManualPrefix = "CTRL",
.PlaceholdersWindream = SourceAttributes
}
Dim oResult = oForm2.ShowDialog()
@@ -677,6 +635,43 @@ Public Class frmAdministration
LOGGER.Error(ex)
End Try
End Sub
Private Sub btnSQLView_Click(sender As Object, e As EventArgs) Handles btnSQLView.Click
Dim oIndexGuid As Integer = GUIDTextBox1.Text
Dim oDocTypeGuid As Integer = DOKART_GUIDTextBox.Text
Try
Dim oConnection As Integer = 1
Dim oSQLCommand = ""
If txtManIndexConnectionId.Text <> String.Empty Then
oConnection = txtManIndexConnectionId.Text
End If
If txtManIndexSQL.Text <> String.Empty Then
oSQLCommand = txtManIndexSQL.Text
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("NAME"))
Dim oForm2 As New DigitalData.GUIs.Common.frmSQLEditor(LOGCONFIG, DATABASE_ECM) With {
.SQLCommand = oSQLCommand,
.SQLConnection = oConnection,
.PlaceholdersManual = oPlaceholders,
.PlaceholdersManualPrefix = "CTRL",
.PlaceholdersWindream = SourceAttributes
}
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)
End Try
End Sub
Private Sub TYPEComboBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TYPEComboBox.SelectedIndexChanged
If TYPEComboBox.SelectedIndex <> -1 Then