MS .0.8
This commit is contained in:
@@ -50,11 +50,17 @@ Public Class frmAdministration
|
||||
End Try
|
||||
If IDB_ACTIVE = True Then
|
||||
IDBData.Init()
|
||||
Label7.Text = "Datei-Suche (SQL):"
|
||||
lblSearch.Text = "Datei-Suche (SQL):"
|
||||
btnWMopenSuche.Visible = False
|
||||
SORT_BY_LATESTCheckBox.Visible = False
|
||||
PRIORITYNumericUpDown.Visible = False
|
||||
lblPriority.Visible = False
|
||||
Else
|
||||
Label7.Text = "windream-Suche:"
|
||||
lblSearch.Text = "windream-Suche:"
|
||||
btnWMopenSuche.Visible = True
|
||||
SORT_BY_LATESTCheckBox.Visible = True
|
||||
PRIORITYNumericUpDown.Visible = True
|
||||
lblPriority.Visible = True
|
||||
End If
|
||||
ObjekttypenEintragen()
|
||||
Indexe_eintragen()
|
||||
@@ -429,7 +435,7 @@ Public Class frmAdministration
|
||||
|
||||
Case 1
|
||||
RibbonPageGroup1.Enabled = False
|
||||
|
||||
RibbonPageGroup2.Enabled = False
|
||||
If PROFILGUIDTextBox.Text = String.Empty Then
|
||||
MsgBox("Kein Profil angelegt oder ausgeählt", MsgBoxStyle.Critical)
|
||||
Else
|
||||
@@ -915,10 +921,14 @@ Public Class frmAdministration
|
||||
End If
|
||||
|
||||
propertyGrid.Refresh()
|
||||
ElseIf e.ChangedItem.Label = "IndexName" Then
|
||||
Dim type As Integer = FINALINDICES.GetIndexType(e.ChangedItem.Value, MyIndicies, MyIndicies_Types)
|
||||
obj.VectorIndex = FINALINDICES.IsVectorIndex(type)
|
||||
|
||||
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)
|
||||
End If
|
||||
propertyGrid.Refresh()
|
||||
End If
|
||||
End Sub
|
||||
@@ -964,32 +974,14 @@ Public Class frmAdministration
|
||||
'wenn Speichern ja
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Dim copySuffix = "_COPY"
|
||||
|
||||
While TBPM_PROFILETableAdapter.cmdProfileExists($"{NAMETextBox.Text}{copySuffix}") > 0
|
||||
copySuffix = copySuffix & "_COPY"
|
||||
End While
|
||||
|
||||
TBPM_PROFILETableAdapter.cmdInsert_Copy(copySuffix, USER_USERNAME, PROFILGUIDTextBox.Text)
|
||||
Dim NewGUID As Integer = TBPM_PROFILETableAdapter.cmdMaxGuid
|
||||
If NewGUID > 0 Then
|
||||
Dim _sql = "INSERT INTO TBPM_PROFILE_CONTROLS " &
|
||||
"(NAME, PROFIL_ID, CTRL_TYPE, CTRL_TEXT, X_LOC, Y_LOC, ADDED_WHO, INDEX_NAME, TYP, VALIDATION, CHOICE_LIST, CONNECTION_ID, SQL_UEBERPRUEFUNG, HEIGHT, WIDTH, READ_ONLY, " &
|
||||
"LOAD_IDX_VALUE, FONT_STYLE, FONT_SIZE, FONT_FAMILY, FONT_COLOR) " &
|
||||
"SELECT LOWER(CTRL_TYPE + CONVERT(VARCHAR(4),ROW_NUMBER() OVER (ORDER BY CTRL_TYPE))),@NEW_PROFIL_ID, CTRL_TYPE, CTRL_TEXT, X_LOC, Y_LOC, '@User', INDEX_NAME, TYP, VALIDATION, CHOICE_LIST, CONNECTION_ID, SQL_UEBERPRUEFUNG, HEIGHT, WIDTH, " &
|
||||
"READ_ONLY, LOAD_IDX_VALUE, FONT_STYLE, FONT_SIZE, FONT_FAMILY, FONT_COLOR " &
|
||||
"FROM TBPM_PROFILE_CONTROLS AS TBPM_PROFILE_CONTROLS_1 " &
|
||||
"WHERE (PROFIL_ID = @Copy_profilId) "
|
||||
_sql = _sql.Replace("@NEW_PROFIL_ID", NewGUID)
|
||||
_sql = _sql.Replace("@User", USER_USERNAME)
|
||||
_sql = _sql.Replace("@Copy_profilId", PROFILGUIDTextBox.Text)
|
||||
|
||||
TBPM_PROFILE_FINAL_INDEXINGTableAdapter.CopyFinalIndex(NewGUID, USER_USERNAME, PROFILGUIDTextBox.Text)
|
||||
'TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertCopy(NewGUID, USER_USERNAME, PROFILGUIDTextBox.Text)
|
||||
Execute_SQL(_sql)
|
||||
Dim oEXECSQL As String = $"EXEC PRPM_COPY_PROFILE {PROFILGUIDTextBox.Text},'{USER_USERNAME}'"
|
||||
If ClassDatabase.Execute_non_Query(oEXECSQL) = True Then
|
||||
MsgBox("Das Profil " & NAMETextBox.Text & " wurde erfolgreich kopiert!", MsgBoxStyle.Information, "Erfolgsmeldung")
|
||||
Refresh_Profildaten()
|
||||
Else
|
||||
MsgBox("Error creating a profileCopy - Please check Your log!", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Fehler bei Anlage Profilkopie:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:")
|
||||
@@ -1031,9 +1023,14 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem7.ItemClick
|
||||
Save_Profile
|
||||
End Sub
|
||||
Sub Save_Profile()
|
||||
Try
|
||||
Me.TBPM_PROFILEBindingSource.EndEdit()
|
||||
If DD_DMSLiteDataSet.TBPM_PROFILE.GetChanges Is Nothing = False Then
|
||||
CHANGED_WHOTextBox.Text = USER_USERNAME
|
||||
Me.TBPM_PROFILEBindingSource.EndEdit()
|
||||
Me.TBPM_PROFILETableAdapter.Update(DD_DMSLiteDataSet.TBPM_PROFILE)
|
||||
tsbStaticInfo.Caption = $"ProfileData saved - {Now.ToLongTimeString}"
|
||||
|
||||
@@ -1078,13 +1075,13 @@ Public Class frmAdministration
|
||||
|
||||
Private Sub BarButtonItem13_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem13.ItemClick
|
||||
Try
|
||||
Dim oSQL = CURRENT_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW")
|
||||
Dim oSQL = BASEDATA_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW")
|
||||
Dim oForm As New frmSQL_DESIGNER() With {.SQLCommand = oSQL}
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
ClassDatabase.Execute_non_Query(String.Format("UPDATE TBPM_KONFIGURATION SET SQL_PROFILE_MAIN_VIEW = '{0}' WHERE GUID = 1", oForm.SQLCommand.Replace("'", "''")))
|
||||
CURRENT_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW") = oForm.SQLCommand
|
||||
BASEDATA_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW") = oForm.SQLCommand
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Speichern: " & vbNewLine & vbNewLine & ex.Message)
|
||||
@@ -1144,6 +1141,7 @@ Public Class frmAdministration
|
||||
Dim preventDuplicates As Integer = IIf(obj.PreventDuplicates, 1, 0)
|
||||
Dim AllowAddNewValues As Integer = IIf(obj.AllowAddNewValues, 1, 0)
|
||||
Dim IF_VEKTOR_BEHAVIOUR As String = NotNull(obj.VectorBehaviour, String.Empty)
|
||||
Dim oDescription As String = NotNull(obj.Description, String.Empty)
|
||||
|
||||
If indexName = String.Empty Then
|
||||
MsgBox("We need an index!", MsgBoxStyle.Exclamation)
|
||||
@@ -1171,7 +1169,7 @@ Public Class frmAdministration
|
||||
End If
|
||||
Else
|
||||
Dim sql As String = $"UPDATE TBPM_PROFILE_FINAL_INDEXING
|
||||
SET CONNECTION_ID = {connectionId}, SQL_COMMAND = '{sqlCommand}', INDEXNAME = '{indexName}', CHANGED_WHO = '{addedWho}',
|
||||
SET CONNECTION_ID = {connectionId}, SQL_COMMAND = '{sqlCommand}', INDEXNAME = '{indexName}', CHANGED_WHO = '{addedWho}', DESCRIPTION = '{oDescription}',
|
||||
VALUE = '{value}', ACTIVE = {active}, ALLOW_NEW_VALUES = {AllowAddNewValues}, PREVENT_DUPLICATES = {preventDuplicates},IF_VEKTOR_BEHAVIOUR = '{IF_VEKTOR_BEHAVIOUR}'
|
||||
WHERE GUID = {guid}"
|
||||
|
||||
@@ -1200,4 +1198,50 @@ Public Class frmAdministration
|
||||
Private Sub gridFinalIndex_MouseHover(sender As Object, e As EventArgs) Handles gridFinalIndex.MouseHover
|
||||
RibbonPageGroup2.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub CHANGED_WHENLabel_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem20_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem20.ItemClick
|
||||
Try
|
||||
Dim oSQL = BASEDATA_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW")
|
||||
CURRENT_DESIGN_TYPE = "SQL_OVERVIEW"
|
||||
Dim oForm As New frmSQL_DESIGNER() With {.SQLCommand = oSQL}
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
ClassDatabase.Execute_non_Query(String.Format("UPDATE TBPM_KONFIGURATION SET SQL_PROFILE_MAIN_VIEW = '{0}' WHERE GUID = 1", oForm.SQLCommand.Replace("'", "''")))
|
||||
BASEDATA_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW") = oForm.SQLCommand
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Saving SQL Overview: " & vbNewLine & vbNewLine & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem21_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem21.ItemClick
|
||||
Try
|
||||
profile_guid = PROFILGUIDTextBox.Text
|
||||
CURRENT_ProfilGUID = PROFILGUIDTextBox.Text
|
||||
CURRENT_DESIGN_TYPE = "SQL_PROFILE"
|
||||
Dim oSQL = $"SELECT [SQL_VIEW] FROM TBPM_PROFILE WHERE GUID = {CURRENT_ProfilGUID}"
|
||||
Dim oldSQL = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
Dim oForm As New frmSQL_DESIGNER() With {.SQLCommand = oldSQL}
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
If oldSQL <> oForm.SQLCommand Then
|
||||
Dim oUpdate As String = $"Update TBPM_PROFILE SET CHANGED_WHO = '{USER_USERNAME}', SQL_VIEW = '{oForm.SQLCommand.Replace("'", "''")}' WHERE GUID = {CURRENT_ProfilGUID}"
|
||||
If ClassDatabase.Execute_non_Query(oUpdate) = True Then
|
||||
tsbStaticInfo.Caption = $"Profile SQL saved - {Now.ToLongTimeString}"
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Saving Profile SQL: " & vbNewLine & vbNewLine & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user