MS
This commit is contained in:
@@ -482,6 +482,18 @@ Public Class ClassControlBuilder
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub OnComboBoxFocused(sender As Object, ByVal e As EventArgs)
|
||||
If CURRENT_RECORD_ENABLED = False Then Exit Sub
|
||||
|
||||
Try
|
||||
Dim control As Control = DirectCast(sender, Control)
|
||||
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||
CURRENT_COMBOBOX_SELECTED_INDEX = DirectCast(control, CustomComboBox).SelectedIndex
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in OnComboBoxFocused - " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Public Sub OnComboBoxValueChanged(sender As Object, ByVal e As EventArgs)
|
||||
If CURRENT_RECORD_ENABLED = False Then Exit Sub
|
||||
|
||||
@@ -489,9 +501,21 @@ Public Class ClassControlBuilder
|
||||
Dim control As Control = DirectCast(sender, Control)
|
||||
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||
CONTROL_ID = controlId
|
||||
If CONTROL_ID = 29 Then
|
||||
Console.WriteLine("Obacht")
|
||||
End If
|
||||
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'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)
|
||||
Dim value
|
||||
@@ -526,6 +550,7 @@ Public Class ClassControlBuilder
|
||||
Enable_Controls(control, datatable1, value)
|
||||
|
||||
Console.WriteLine("value changed")
|
||||
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("Objektverweis") Or ex.Message.Contains("reference not set") Then
|
||||
|
||||
@@ -542,9 +567,32 @@ Public Class ClassControlBuilder
|
||||
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||
CONTROL_ID = controlId
|
||||
control.Update()
|
||||
If CONTROL_ID = 993 Then
|
||||
Console.WriteLine("Obacht")
|
||||
End If
|
||||
|
||||
|
||||
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)
|
||||
RECORD_CHANGED = False
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
'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
|
||||
@@ -744,6 +792,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Case "CustomComboBox"
|
||||
Dim combo As CustomComboBox = CType(control, CustomComboBox)
|
||||
AddHandler combo.GotFocus, AddressOf OnComboBoxFocused
|
||||
AddHandler combo.SelectedValueChanged, AddressOf RecordChanged
|
||||
AddHandler combo.SelectedValueChanged, AddressOf OnComboBoxValueChanged
|
||||
AddHandler combo.TextChanged, AddressOf RecordChanged
|
||||
|
||||
Reference in New Issue
Block a user