This commit is contained in:
2020-03-17 14:44:03 +01:00
parent b3330ad1cc
commit 8a9a1d409e
6 changed files with 392 additions and 179 deletions

View File

@@ -346,7 +346,7 @@ Public Class frmFormDesigner
SetMovementHandlers(label)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, label.Name, "LBL", label.Text, label.Location.X, label.Location.Y, USER_USERNAME, label.Size.Height, label.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = label
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -361,7 +361,7 @@ Public Class frmFormDesigner
SetMovementHandlers(txt)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, txt.Name, "TXT", txt.Name, txt.Location.X, txt.Location.Y, USER_USERNAME, txt.Size.Height, txt.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = txt
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -375,7 +375,7 @@ Public Class frmFormDesigner
SetMovementHandlers(cmb)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, cmb.Name, "CMB", cmb.Name, cmb.Location.X, cmb.Location.Y, USER_USERNAME, cmb.Size.Height, cmb.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = cmb
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -389,7 +389,7 @@ Public Class frmFormDesigner
SetMovementHandlers(dtp)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, dtp.Name, "DTP", dtp.Name, dtp.Location.X, dtp.Location.Y, USER_USERNAME, dtp.Size.Height, dtp.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = dtp
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -403,7 +403,7 @@ Public Class frmFormDesigner
SetMovementHandlers(chk)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, chk.Name, "CHK", chk.Text, chk.Location.X, chk.Location.Y, USER_USERNAME, chk.Size.Height, chk.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = chk
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -418,7 +418,7 @@ Public Class frmFormDesigner
SetMovementHandlers(lc)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, lc.Name, "LOOKUP", lc.Name, lc.Location.X, lc.Location.Y, USER_USERNAME, lc.Size.Height, lc.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = lc
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -434,7 +434,7 @@ Public Class frmFormDesigner
AddHandler tb.MouseClick, AddressOf gridControl_MouseClick
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, tb.Name, "TABLE", tb.Name, tb.Location.X, tb.Location.Y, USER_USERNAME, tb.Size.Height, tb.Size.Width)
CHANGES_IN_ADMINISTRATION = True
Dim oControlId = GetLastID()
CurrentControl = tb
@@ -453,7 +453,7 @@ Public Class frmFormDesigner
SetMovementHandlers(line)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, line.Name, "LINE", line.Name, line.Location.X, line.Location.Y, USER_USERNAME, line.Size.Height, line.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = line
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -468,7 +468,7 @@ Public Class frmFormDesigner
SetMovementHandlers(oButton)
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, oButton.Name, "BUTTON", oButton.Name, oButton.Location.X, oButton.Location.Y, USER_USERNAME, oButton.Size.Height, oButton.Size.Width)
CHANGES_IN_ADMINISTRATION = True
CurrentControl = oButton
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
.Guid = GetLastID(),
@@ -594,12 +594,6 @@ Public Class frmFormDesigner
Return pnldesigner.PointToClient(Cursor.Position)
End Function
Private Sub btndelete_Click(sender As System.Object, e As EventArgs) Handles btndelete.Click
If CurrentControl Is Nothing = False Then
DeleteControl(CurrentControl.Name)
TabControlEigenschaften.Enabled = False
End If
End Sub
Private Sub btnwidth_plus_Click(sender As System.Object, e As EventArgs) Handles btnwidth_plus.Click
If CurrentControl Is Nothing = False Then
@@ -653,9 +647,6 @@ Public Class frmFormDesigner
End If
End Sub
Private Sub btnrefresh_Click(sender As Object, e As EventArgs) Handles btnrefresh.Click
LoadControls()
End Sub
''' <summary>
''' Setzt die Eventhandler für ein Control, die für die Bewegung via Drag & Drop und das Laden der Eigentschaften verantwortlich sind
@@ -1033,10 +1024,16 @@ Public Class frmFormDesigner
Case "Enable_SQL"
UpdateSingleValue("SQL_ENABLE", newValue)
UpdateSingleValue("CONNECTION_ID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "Override_SQL"
UpdateSingleValue("SQL2", newValue)
UpdateSingleValue("CONNECTION_ID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "SetControlData"
UpdateSingleValue("SET_CONTROL_DATA", newValue)
UpdateSingleValue("CONNECTION_ID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "ChoiceList"
UpdateSingleValue("CHOICE_LIST", newValue)
UpdateSingleValue("SQL_UEBERPRUEFUNG", "")
@@ -1145,4 +1142,44 @@ Public Class frmFormDesigner
LOGGER.Error(ex)
End Try
End Sub
Private Sub bbtnItemFinishSQL_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnItemFinishSQL.ItemClick
Try
CURRENT_DESIGN_TYPE = "SQL_BTNFINISH"
Dim oSQL = $"SELECT SQL_BTN_FINISH FROM TBPM_PROFILE WHERE GUID = {ProfileId}"
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_BTN_FINISH = '{oForm.SQLCommand.Replace("'", "''")}' WHERE GUID = {CURRENT_ProfilGUID}"
If ClassDatabase.Execute_non_Query(oUpdate) = True Then
tslblAenderungen.Text = $"Profile SQLFinish saved - {Now.ToLongTimeString}"
tslblAenderungen.Visible = True
CHANGES_IN_ADMINISTRATION = True
Else
tslblAenderungen.Visible = False
End If
End If
End If
Catch ex As Exception
MsgBox("Error in Saving Profile SQLFinish: " & vbNewLine & vbNewLine & ex.Message)
LOGGER.Error(ex)
End Try
End Sub
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
If CurrentControl Is Nothing = False Then
DeleteControl(CurrentControl.Name)
TabControlEigenschaften.Enabled = False
End If
End Sub
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
LoadControls()
End Sub
End Class