This commit is contained in:
SchreiberM
2016-08-24 15:54:10 +02:00
parent dc020c2c2e
commit cf2fa721de
7 changed files with 109 additions and 93 deletions

View File

@@ -181,35 +181,38 @@ Public Class ClassControlBuilder
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
CONTROL_ID = controlId
Dim expression As String
expression = "ENTITY_ID = " & CURRENT_FORM_ID
Dim foundControls() As DataRow
' Use the Select method to find all rows matching the filter.
foundControls = CURRENT_DT_TBPMO_ENTITY_RIGHT_CONTROLS.Select(expression)
Dim i As Integer
Dim NODE_CONFIG_ID
If CtrlCommandUI.IsEdit Then
Dim expression As String
expression = "ENTITY_ID = " & CURRENT_FORM_ID
Dim foundControls() As DataRow
' Use the Select method to find all rows matching the filter.
foundControls = CURRENT_DT_TBPMO_ENTITY_RIGHT_CONTROLS.Select(expression)
Dim i As Integer
' Check if control is one of rightcontrols
For i = 0 To foundControls.GetUpperBound(0)
If foundControls(i)("CONTROL_ID") = CONTROL_ID Then
RIGHT_CONTROL_CHANGED = True
Dim msg = MSG_RIGHTMODULE_DE
If USER_LANGUAGE <> "de-DE" Then
msg = MSG_RIGHTMODULE_EN_US
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.No Then
CtrlBuilder.ControlsChanged.Remove(controlId)
' Y U NO WORK??
Dim text = CURRENT_TEXTBOX_SELECTED_TEXT
textbox.Text = text
' Check if control is one of rightcontrols
For i = 0 To foundControls.GetUpperBound(0)
If foundControls(i)("CONTROL_ID") = CONTROL_ID Then
RIGHT_CONTROL_CHANGED = True
Dim msg = MSG_RIGHTMODULE_DE
If USER_LANGUAGE <> "de-DE" Then
msg = MSG_RIGHTMODULE_EN_US
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.No Then
CtrlBuilder.ControlsChanged.Remove(controlId)
' Y U NO WORK??
Dim text = CURRENT_TEXTBOX_SELECTED_TEXT
textbox.Text = text
CURRENT_RECORD_ENABLED = True
Exit Sub
CURRENT_RECORD_ENABLED = True
Exit Sub
End If
End If
End If
Next
Next
End If
Catch ex As Exception
If ex.Message.Contains("Objektverweis") Or ex.Message.Contains("reference not set") Then
@@ -553,37 +556,39 @@ Public Class ClassControlBuilder
Dim combo As CustomComboBox = DirectCast(control, CustomComboBox)
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
CONTROL_ID = controlId
If CtrlCommandUI.IsEdit Then
Dim expression As String
expression = "ENTITY_ID = " & CURRENT_FORM_ID
Dim foundControls() As DataRow
' Use the Select method to find all rows matching the filter.
foundControls = CURRENT_DT_TBPMO_ENTITY_RIGHT_CONTROLS.Select(expression)
Dim i As Integer
Dim NODE_CONFIG_ID
' Check if control is one of rightcontrols
For i = 0 To foundControls.GetUpperBound(0)
If foundControls(i)("CONTROL_ID") = CONTROL_ID Then
RIGHT_CONTROL_CHANGED = True
Dim msg = MSG_RIGHTMODULE_DE
If USER_LANGUAGE <> "de-DE" Then
msg = MSG_RIGHTMODULE_EN_US
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.No Then
CtrlBuilder.ControlsChanged.Remove(controlId)
' Y U NO WORK??
Dim text = CURRENT_COMBOBOX_SELECTED_TEXT
combo.SelectedIndex = -1
combo.SelectedText = text
combo.Text = text
Dim expression As String
expression = "ENTITY_ID = " & CURRENT_FORM_ID
Dim foundControls() As DataRow
' Use the Select method to find all rows matching the filter.
foundControls = CURRENT_DT_TBPMO_ENTITY_RIGHT_CONTROLS.Select(expression)
Dim i As Integer
Dim NODE_CONFIG_ID
' Check if control is one of rightcontrols
For i = 0 To foundControls.GetUpperBound(0)
If foundControls(i)("CONTROL_ID") = CONTROL_ID Then
RIGHT_CONTROL_CHANGED = True
Dim msg = MSG_RIGHTMODULE_DE
If USER_LANGUAGE <> "de-DE" Then
msg = MSG_RIGHTMODULE_EN_US
CURRENT_RECORD_ENABLED = True
Exit Sub
End If
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.No Then
CtrlBuilder.ControlsChanged.Remove(controlId)
' Y U NO WORK??
Dim text = CURRENT_COMBOBOX_SELECTED_TEXT
combo.SelectedIndex = -1
combo.SelectedText = text
combo.Text = text
CURRENT_RECORD_ENABLED = True
Exit Sub
End If
End If
Next
Next
End If
Dim onRecordChangedHandler As EventHandler = CType(Me.Events(_onRecordChangedName), EventHandler)
If Not ControlsChanged.Contains(controlId) Then
@@ -648,37 +653,39 @@ Public Class ClassControlBuilder
CONTROL_ID = controlId
control.Update()
If CtrlCommandUI.IsEdit Then
Dim expression As String
expression = "ENTITY_ID = " & CURRENT_FORM_ID
Dim foundControls() As DataRow
' Use the Select method to find all rows matching the filter.
foundControls = CURRENT_DT_TBPMO_ENTITY_RIGHT_CONTROLS.Select(expression)
Dim i As Integer
' Check if control is one of rightcontrols
For i = 0 To foundControls.GetUpperBound(0)
If foundControls(i)("CONTROL_ID") = CONTROL_ID Then
RIGHT_CONTROL_CHANGED = True
Dim msg = MSG_RIGHTMODULE_DE
If USER_LANGUAGE <> "de-DE" Then
msg = MSG_RIGHTMODULE_EN_US
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.No Then
RIGHT_CONTROL_CHANGED = False
CtrlBuilder.ControlsChanged.Remove(controlId)
Dim expression As String
expression = "ENTITY_ID = " & CURRENT_FORM_ID
Dim foundControls() As DataRow
' Use the Select method to find all rows matching the filter.
foundControls = CURRENT_DT_TBPMO_ENTITY_RIGHT_CONTROLS.Select(expression)
Dim i As Integer
' Check if control is one of rightcontrols
For i = 0 To foundControls.GetUpperBound(0)
If foundControls(i)("CONTROL_ID") = CONTROL_ID Then
RIGHT_CONTROL_CHANGED = True
Dim msg = MSG_RIGHTMODULE_DE
If USER_LANGUAGE <> "de-DE" Then
msg = MSG_RIGHTMODULE_EN_US
Dim loadedValues As List(Of Object) = (From row In CURRENT_CONTROL_VALUES.AsEnumerable()
Where row.Item("CONTROL_ID") = controlId
Select row.Item("VALUE")).ToList()
ClassControlValues.LoadControlValue(CURRENT_RECORD_ID, CURRENT_PARENT_RECORD_ID, CONTROL_ID, control, loadedValues, CURRENT_FORM_ID)
RECORD_CHANGED = False
Exit Sub
End If
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.No Then
RIGHT_CONTROL_CHANGED = False
CtrlBuilder.ControlsChanged.Remove(controlId)
Dim loadedValues As List(Of Object) = (From row In CURRENT_CONTROL_VALUES.AsEnumerable()
Where row.Item("CONTROL_ID") = controlId
Select row.Item("VALUE")).ToList()
ClassControlValues.LoadControlValue(CURRENT_RECORD_ID, CURRENT_PARENT_RECORD_ID, CONTROL_ID, control, loadedValues, CURRENT_FORM_ID)
RECORD_CHANGED = False
Exit Sub
End If
End If
Next
Next
End If
'SQL für abhängige Auswahllisten
Dim SQL As String = String.Format("SELECT GUID, SQL_COMMAND_1,CONTROL_TYPE_ID,FORMAT_TYPE FROM TBPMO_CONTROL WHERE SQL_COMMAND_1 LIKE '%@{0}@%'", controlId)
'SQL für enable control