Add control placeholders to sqls, fix final indexing saving, fix icons
This commit is contained in:
@@ -17,7 +17,7 @@ Public Class frmAdministration
|
||||
|
||||
Private Property change_BindingSource As Boolean = False
|
||||
|
||||
Dim FinalIndexChanging As Boolean = False
|
||||
'Dim FinalIndexChanging As Boolean = False
|
||||
Private INSERT_ACTIVE As Boolean = False
|
||||
Dim DT_CHART_CONFIG As DataTable
|
||||
Dim DT2Compare As DataTable
|
||||
@@ -425,6 +425,11 @@ Public Class frmAdministration
|
||||
If NAMETextBox.Text <> String.Empty Then
|
||||
TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Fill(FinalIndexDataSet.TBPM_PROFILE_FINAL_INDEXING, NAMETextBox.Text)
|
||||
End If
|
||||
|
||||
If FinalIndexDataSet.TBPM_PROFILE_FINAL_INDEXING.Count = 0 Then
|
||||
PropertyGrid1.SelectedObject = Nothing
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Refresh_Final_indexe:")
|
||||
End Try
|
||||
@@ -952,6 +957,13 @@ Public Class frmAdministration
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oShouldRefreshGrid = False
|
||||
If UNSAVED_CHANGES_FI = True Then
|
||||
oShouldRefreshGrid = CHECK_QUESTION_CHANGES()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim guid As Integer = focusedRow.Item("GUID")
|
||||
Dim index As String = NotNull(focusedRow.Item("INDEXNAME"), Nothing)
|
||||
Dim sqlCommand As String = NotNull(focusedRow.Item("SQL_COMMAND"), "")
|
||||
@@ -1004,6 +1016,10 @@ Public Class frmAdministration
|
||||
|
||||
PropertyGrid1.SelectedObject = obj
|
||||
PropertyGrid1.Refresh()
|
||||
|
||||
If oShouldRefreshGrid Then
|
||||
Refresh_Final_indexe()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox($"Error while loading Final Index properties: {ex.Message}", MsgBoxStyle.Critical)
|
||||
@@ -1016,41 +1032,43 @@ Public Class frmAdministration
|
||||
If formloaded = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim propertyGrid As PropertyGrid = s
|
||||
Dim obj As FinalIndexProperties = propertyGrid.SelectedObject
|
||||
|
||||
If TypeOf (e.ChangedItem.Value) Is SQLValue Then
|
||||
Dim value As SQLValue = e.ChangedItem.Value
|
||||
Try
|
||||
Dim propertyGrid As PropertyGrid = s
|
||||
Dim obj As FinalIndexProperties = propertyGrid.SelectedObject
|
||||
|
||||
If value.Value <> String.Empty Then
|
||||
'obj.ConnectionId = CURRENT_CONN_ID_FINAL_INDEX
|
||||
obj.StringValue = "SQL-Command"
|
||||
obj.ConnectionId = value.ConnectionId
|
||||
If TypeOf (e.ChangedItem.Value) Is SQLValue Then
|
||||
Dim value As SQLValue = e.ChangedItem.Value
|
||||
|
||||
'obj.FloatValue = 0
|
||||
' obj.IntegerValue = 0
|
||||
If value.Value <> String.Empty Then
|
||||
'obj.ConnectionId = CURRENT_CONN_ID_FINAL_INDEX
|
||||
obj.StringValue = "SQL-Command"
|
||||
obj.ConnectionId = value.ConnectionId
|
||||
|
||||
'obj.FloatValue = 0
|
||||
' obj.IntegerValue = 0
|
||||
End If
|
||||
|
||||
propertyGrid.Refresh()
|
||||
Else
|
||||
Dim lbl = e.ChangedItem.Label
|
||||
If e.ChangedItem.Label = "Description" Then
|
||||
obj.Description = e.ChangedItem.Value
|
||||
ElseIf e.ChangedItem.Label = "IndexName" Then
|
||||
Dim type As Integer = FINALINDICES.GetIndexType(e.ChangedItem.Value, MyIndicies, MyIndicies_Types)
|
||||
obj.VectorIndex = FINALINDICES.IsVectorIndex(type)
|
||||
ElseIf e.ChangedItem.Label = "Sequence" Then
|
||||
obj.Sequence = e.ChangedItem.Value
|
||||
ElseIf e.ChangedItem.Label = "ContinueOnIndifferentState" Then
|
||||
obj.ContinueOnIndifferentState = e.ChangedItem.Value
|
||||
End If
|
||||
propertyGrid.Refresh()
|
||||
End If
|
||||
|
||||
propertyGrid.Refresh()
|
||||
Else
|
||||
Dim lbl = e.ChangedItem.Label
|
||||
If e.ChangedItem.Label = "Description" Then
|
||||
obj.Description = e.ChangedItem.Value
|
||||
ElseIf e.ChangedItem.Label = "IndexName" Then
|
||||
Dim type As Integer = FINALINDICES.GetIndexType(e.ChangedItem.Value, MyIndicies, MyIndicies_Types)
|
||||
obj.VectorIndex = FINALINDICES.IsVectorIndex(type)
|
||||
ElseIf e.ChangedItem.Label = "Sequence" Then
|
||||
obj.Sequence = e.ChangedItem.Value
|
||||
ElseIf e.ChangedItem.Label = "ContinueOnIndifferentState" Then
|
||||
obj.ContinueOnIndifferentState = e.ChangedItem.Value
|
||||
End If
|
||||
propertyGrid.Refresh()
|
||||
End If
|
||||
If FinalIndexChanging = False Then
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Finally
|
||||
UNSAVED_CHANGES_FI = True
|
||||
End If
|
||||
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1257,6 +1275,8 @@ Public Class frmAdministration
|
||||
|
||||
Private Sub BarButtonItem18_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem18.ItemClick
|
||||
Save_FI()
|
||||
|
||||
Refresh_Final_indexe()
|
||||
End Sub
|
||||
Private Sub Save_FI()
|
||||
Try
|
||||
@@ -1333,7 +1353,8 @@ Public Class frmAdministration
|
||||
End If
|
||||
End If
|
||||
|
||||
Refresh_Final_indexe()
|
||||
' This has been moved out to the code that calls Save_FI
|
||||
' Refresh_Final_indexe()
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -1384,8 +1405,12 @@ Public Class frmAdministration
|
||||
Dim oSQL = $"SELECT [SQL_VIEW] FROM TBPM_PROFILE WHERE GUID = {CURRENT_ProfilGUID}"
|
||||
Dim oldSQL = DatabaseFallback.GetScalarValueECM(oSQL)
|
||||
Dim oForm As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
|
||||
.SQLCommand = oldSQL,
|
||||
.SQLConnection = 1}
|
||||
.SQLCommand = oldSQL,
|
||||
.SQLConnection = 1,
|
||||
.PlaceholdersManualPrefix = "CTRL",
|
||||
.PlaceholdersManualTitle = "Controls",
|
||||
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
|
||||
}
|
||||
oForm.ShowDialog()
|
||||
|
||||
If oForm.DialogResult = DialogResult.OK Then
|
||||
@@ -1411,8 +1436,12 @@ Public Class frmAdministration
|
||||
Dim oSQL = $"SELECT SQL_BTN_FINISH FROM TBPM_PROFILE WHERE GUID = {CURRENT_ProfilGUID}"
|
||||
Dim oldSQL = DatabaseFallback.GetScalarValueECM(oSQL) ', CONNECTION_STRING_ECM, "bbtnItemFinishSQL_ItemClick-get SQL_BTN_FINISH")
|
||||
Dim oForm As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
|
||||
.SQLCommand = oldSQL,
|
||||
.SQLConnection = 1}
|
||||
.SQLCommand = oldSQL,
|
||||
.SQLConnection = 1,
|
||||
.PlaceholdersManualPrefix = "CTRL",
|
||||
.PlaceholdersManualTitle = "Controls",
|
||||
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
|
||||
}
|
||||
oForm.ShowDialog()
|
||||
|
||||
If oForm.DialogResult = DialogResult.OK Then
|
||||
@@ -1430,9 +1459,9 @@ Public Class frmAdministration
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
Sub CHECK_QUESTION_CHANGES()
|
||||
Function CHECK_QUESTION_CHANGES() As Boolean
|
||||
If formloaded = False Then
|
||||
Exit Sub
|
||||
Return False
|
||||
End If
|
||||
If UNSAVED_CHANGES_PROFILE Or UNSAVED_CHANGES_FI Then
|
||||
Dim oQuestion As String
|
||||
@@ -1447,17 +1476,21 @@ Public Class frmAdministration
|
||||
If UNSAVED_CHANGES_PROFILE Then
|
||||
Save_Profile()
|
||||
End If
|
||||
|
||||
If UNSAVED_CHANGES_FI Then
|
||||
Save_FI()
|
||||
End If
|
||||
' TBPM_PROFILEBindingSource.Position = PROFILEBS_POS - 1
|
||||
|
||||
Return True
|
||||
Else
|
||||
Refresh_Profildaten()
|
||||
DD_DMSLiteDataSet.RejectChanges()
|
||||
'UNSAVED_CHANGES_PROFILE = False
|
||||
UNSAVED_CHANGES_PROFILE = False
|
||||
UNSAVED_CHANGES_FI = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
'Private Sub NAMETextBox_TextChanged(sender As Object, e As EventArgs) Handles WD_SEARCHTextBox.TextChanged, TITLETextBox.TextChanged, NAMETextBox.TextChanged,
|
||||
' FINAL_TEXTTextBox.TextChanged, DESCRIPTIONTextBox.TextChanged, WORK_HISTORY_ENTRYTextBox.TextChanged, MOVE2FOLDERTextBox.TextChanged
|
||||
@@ -1490,7 +1523,7 @@ Public Class frmAdministration
|
||||
'End Sub
|
||||
|
||||
Private Sub GridView1_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewProfile.FocusedRowChanged
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE Or change_BindingSource = True Then
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or UNSAVED_CHANGES_FI = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
change_BindingSource = True
|
||||
@@ -1801,15 +1834,16 @@ Public Class frmAdministration
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub gridFinalIndex_Click(sender As Object, e As EventArgs) Handles gridFinalIndex.Click
|
||||
FinalIndexChanging = False
|
||||
End Sub
|
||||
'Private Sub gridFinalIndex_Click(sender As Object, e As EventArgs) Handles gridFinalIndex.Click
|
||||
' FinalIndexChanging = False
|
||||
'End Sub
|
||||
|
||||
Private Sub TBPM_PROFILE_FINAL_INDEXINGBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBPM_PROFILE_FINAL_INDEXINGBindingSource.CurrentChanged
|
||||
FinalIndexChanging = True
|
||||
End Sub
|
||||
'Private Sub TBPM_PROFILE_FINAL_INDEXINGBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBPM_PROFILE_FINAL_INDEXINGBindingSource.CurrentChanged
|
||||
' FinalIndexChanging = True
|
||||
'End Sub
|
||||
|
||||
Private Sub GridViewProfile_BeforeLeaveRow(sender As Object, e As RowAllowEventArgs) Handles GridViewProfile.BeforeLeaveRow
|
||||
EditMode_Profile("Unlock")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user