HandleControlValueChange for all controls, Validate Grid values on a per-cell basis, add clipboard functions to validator grids, add GUIs.Common reference
This commit is contained in:
parent
2ab4247eae
commit
7e39562f5f
@ -11,6 +11,7 @@ Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.GUIs.Common
|
||||
|
||||
Public Class ClassControlCreator
|
||||
|
||||
@ -422,6 +423,9 @@ Public Class ClassControlCreator
|
||||
oView.OptionsView.ShowGroupPanel = False
|
||||
oControl.ContextMenu = Nothing
|
||||
|
||||
Dim oGridBuilder As New GridBuilder(oView)
|
||||
oGridBuilder.WithClipboardHandler()
|
||||
|
||||
If Not designMode Then
|
||||
oView.OptionsBehavior.Editable = Not row.Item("READ_ONLY")
|
||||
oView.OptionsBehavior.ReadOnly = row.Item("READ_ONLY")
|
||||
@ -537,68 +541,27 @@ Public Class ClassControlCreator
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
AddHandler oView.ValidateRow, Sub(sender As Object, e As ValidateRowEventArgs)
|
||||
Dim oRow As DataRowView = oView.GetRow(oView.FocusedRowHandle)
|
||||
AddHandler oView.ValidatingEditor, Sub(sender As Object, e As BaseContainerValidateEditorEventArgs)
|
||||
Dim oRow As DataRowView = oView.GetRow(oView.FocusedRowHandle)
|
||||
Dim oColumnName = oView.FocusedColumn.FieldName
|
||||
|
||||
For Each oCol As DataColumn In oRow.DataView.Table.Columns
|
||||
Dim oColumn As DataRow = (From r As DataRow In DT_MY_COLUMNS.Rows
|
||||
Where r.Item("SPALTENNAME") = oCol.ColumnName
|
||||
Select r).FirstOrDefault()
|
||||
|
||||
Dim oGridColumn As GridColumn = (From c As GridColumn In oView.Columns
|
||||
Where c.FieldName = oCol.ColumnName
|
||||
Select c).FirstOrDefault()
|
||||
|
||||
Dim oIsRequired = oColumn.Item("VALIDATION")
|
||||
Dim oValue = NotNull(oView.GetRowCellValue(e.RowHandle, oCol.ColumnName), "")
|
||||
|
||||
Try
|
||||
Dim oRegex = NotNull(oColumn.Item("REGEX_MATCH"), String.Empty)
|
||||
Dim oRegexMessage = NotNull(oColumn.Item("REGEX_MESSAGE_DE"), String.Empty)
|
||||
If oRegex <> String.Empty Then
|
||||
Dim oMatch = New Regex(oRegex).IsMatch(oValue)
|
||||
Dim oDefaultMessage = "Wert entspricht nicht dem gefordertem Format!"
|
||||
Dim oMessage = IIf(oRegexMessage <> String.Empty, oRegexMessage, oDefaultMessage)
|
||||
|
||||
If oMatch = False Then
|
||||
oView.SetColumnError(oGridColumn, oMessage)
|
||||
e.Valid = False
|
||||
Exit For
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
|
||||
If oIsRequired And oValue = "" Then
|
||||
oView.SetColumnError(oGridColumn, "Spalte muss ausgefüllt werden!")
|
||||
e.Valid = False
|
||||
Exit For
|
||||
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
GridTables_ValidateColumn(oView, DT_MY_COLUMNS, oColumnName, e.Value, e.Valid, e.ErrorText)
|
||||
End Sub
|
||||
|
||||
AddHandler oView.InvalidRowException, Sub(sender As Object, e As InvalidRowExceptionEventArgs)
|
||||
e.ExceptionMode = ExceptionMode.NoAction
|
||||
End Sub
|
||||
|
||||
|
||||
AddHandler oView.ValidatingEditor, Sub(sender As Object, e As BaseContainerValidateEditorEventArgs)
|
||||
Dim oValue As String = NotNull(e.Value, "")
|
||||
|
||||
'MsgBox(oValue)
|
||||
|
||||
If oValue.Contains(" | ") Then
|
||||
oValue = oValue.Split(" | ").ToList().First()
|
||||
e.Value = oValue
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
'oView.FocusInvalidRow()
|
||||
|
||||
|
||||
Return oControl
|
||||
End Function
|
||||
|
||||
@ -798,6 +761,46 @@ Public Class ClassControlCreator
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Sub GridTables_HandleControlValueChange(pControlPanel As Panel, pColumnsWithSqlAndControlPlaceholders As DataTable)
|
||||
If Not IsNothing(pColumnsWithSqlAndControlPlaceholders) AndAlso pColumnsWithSqlAndControlPlaceholders.Rows.Count > 0 Then
|
||||
For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows
|
||||
Try
|
||||
Dim oControlId = oRow.Item("CONTROL_ID")
|
||||
Dim oSqlStatement = oRow.Item("SQL_COMMAND")
|
||||
Dim oConnectionId = oRow.Item("CONNECTION_ID")
|
||||
Dim oColumnName = oRow.Item("SPALTENNAME")
|
||||
Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP")
|
||||
|
||||
If Not IsDBNull(oSqlStatement) And Not IsDBNull(oSqlStatement) Then
|
||||
oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, pControlPanel, True)
|
||||
|
||||
ClassControlCreator.GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSqlStatement, oConnectionId, oAdvancedLookup)
|
||||
|
||||
|
||||
' === Block to force setting the editor for GridColumns
|
||||
For Each oControl As Control In pControlPanel.Controls
|
||||
Try
|
||||
Dim oMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
|
||||
If oMeta.Guid = oControlId AndAlso TypeOf oControl Is GridControl Then
|
||||
Dim oGrid As GridControl = DirectCast(oControl, GridControl)
|
||||
DirectCast(oGrid.FocusedView, GridView).FocusInvalidRow()
|
||||
Exit For
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
' === End
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in Display SQL result for grid column: " & oRow.Item("CONTROL_ID") & " - ERROR: " & ex.Message)
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Shared Function GridTables_TestEditorExistsByControlAndColumn(oControlId As Integer, pColumn As String) As Boolean
|
||||
If GridTables.ContainsKey(oControlId) Then
|
||||
Dim oContainsKey = GridTables.Item(oControlId).ContainsKey(pColumn)
|
||||
@ -811,4 +814,43 @@ Public Class ClassControlCreator
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Shared Function GridTables_ValidateColumn(pView As GridView, pColumnDefinition As DataTable, ColumnName As String, pValue As Object, ByRef pIsValid As Boolean, ByRef pErrorText As String) As Boolean
|
||||
Dim oColumn As DataRow = (From r As DataRow In pColumnDefinition.Rows
|
||||
Where r.Item("SPALTENNAME") = ColumnName
|
||||
Select r).FirstOrDefault()
|
||||
|
||||
Dim oGridColumn As GridColumn = (From c As GridColumn In pView.Columns
|
||||
Where c.FieldName = ColumnName
|
||||
Select c).FirstOrDefault()
|
||||
|
||||
Dim oIsRequired = oColumn.Item("VALIDATION")
|
||||
|
||||
Try
|
||||
Dim oRegex = NotNull(oColumn.Item("REGEX_MATCH"), String.Empty)
|
||||
Dim oRegexMessage = NotNull(oColumn.Item("REGEX_MESSAGE_DE"), String.Empty)
|
||||
If oRegex <> String.Empty Then
|
||||
Dim oMatch = New Regex(oRegex).IsMatch(pValue.ToString)
|
||||
Dim oDefaultMessage = "Wert entspricht nicht dem gefordertem Format!"
|
||||
Dim oMessage = IIf(oRegexMessage <> String.Empty, oRegexMessage, oDefaultMessage)
|
||||
|
||||
If oMatch = False Then
|
||||
pErrorText = oMessage
|
||||
pIsValid = False
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
|
||||
If oIsRequired And pValue.ToString = "" Then
|
||||
pErrorText = "Spalte muss ausgefüllt werden!"
|
||||
pIsValid = False
|
||||
Return False
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@ -159,6 +159,9 @@
|
||||
<Reference Include="DigitalData.Controls.SnapPanel">
|
||||
<HintPath>..\..\..\DDMonorepo\Controls.SnapPanel\bin\Debug\DigitalData.Controls.SnapPanel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.GUIs.Common">
|
||||
<HintPath>..\..\..\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Config">
|
||||
<HintPath>..\..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
12
app/DD_PM_WINDREAM/frmValidator.Designer.vb
generated
12
app/DD_PM_WINDREAM/frmValidator.Designer.vb
generated
@ -30,7 +30,7 @@ Partial Class frmValidator
|
||||
Me.TITLELabel1 = New System.Windows.Forms.Label()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.DESCRIPTIONLabel = New System.Windows.Forms.Label()
|
||||
Me.pnldesigner = New System.Windows.Forms.Panel()
|
||||
Me.PanelValidatorControl = New System.Windows.Forms.Panel()
|
||||
Me.DocumentViewerValidator = New DigitalData.Controls.DocumentViewer.DocumentViewer()
|
||||
Me.ChatControl1 = New DigitalData.Controls.ChatControl.ChatControl()
|
||||
Me.BarAndDockingController3 = New DevExpress.XtraBars.BarAndDockingController(Me.components)
|
||||
@ -162,7 +162,7 @@ Partial Class frmValidator
|
||||
Me.Panel1.Controls.Add(Me.TITLELabel1)
|
||||
Me.Panel1.Controls.Add(Me.btnSave)
|
||||
Me.Panel1.Controls.Add(Me.DESCRIPTIONLabel)
|
||||
Me.Panel1.Controls.Add(Me.pnldesigner)
|
||||
Me.Panel1.Controls.Add(Me.PanelValidatorControl)
|
||||
resources.ApplyResources(Me.Panel1, "Panel1")
|
||||
Me.Panel1.Name = "Panel1"
|
||||
'
|
||||
@ -186,9 +186,9 @@ Partial Class frmValidator
|
||||
'
|
||||
'pnldesigner
|
||||
'
|
||||
resources.ApplyResources(Me.pnldesigner, "pnldesigner")
|
||||
Me.pnldesigner.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.pnldesigner.Name = "pnldesigner"
|
||||
resources.ApplyResources(Me.PanelValidatorControl, "pnldesigner")
|
||||
Me.PanelValidatorControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.PanelValidatorControl.Name = "pnldesigner"
|
||||
'
|
||||
'DocumentViewerValidator
|
||||
'
|
||||
@ -824,7 +824,7 @@ Partial Class frmValidator
|
||||
Friend WithEvents TITLELabel1 As System.Windows.Forms.Label
|
||||
Friend WithEvents btnSave As System.Windows.Forms.Button
|
||||
Friend WithEvents DESCRIPTIONLabel As System.Windows.Forms.Label
|
||||
Friend WithEvents pnldesigner As System.Windows.Forms.Panel
|
||||
Friend WithEvents PanelValidatorControl As System.Windows.Forms.Panel
|
||||
Friend WithEvents PdfBarController1 As DevExpress.XtraPdfViewer.Bars.PdfBarController
|
||||
Friend WithEvents BarManager1 As DevExpress.XtraBars.BarManager
|
||||
Friend WithEvents PdfFileOpenBarItem1 As DevExpress.XtraPdfViewer.Bars.PdfFileOpenBarItem
|
||||
|
||||
@ -134,7 +134,7 @@ Public Class frmValidator
|
||||
Location = My.Settings.frmValidatorPosition
|
||||
Else
|
||||
Try
|
||||
LOGGER.Debug($"!! Invalid PositionData X({My.Settings.frmValidatorPosition.X.ToString}), Y({My.Settings.frmValidatorPosition.Y})")
|
||||
LOGGER.Debug($"!! Invalid PositionData X({My.Settings.frmValidatorPosition.X}), Y({My.Settings.frmValidatorPosition.Y})")
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
@ -476,14 +476,14 @@ Public Class frmValidator
|
||||
'Check whether DocData is there
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
||||
oDataResultCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
|
||||
oDataResultCommand = clsPatterns.ReplaceAllValues(oDataResultCommand, pnldesigner, True)
|
||||
oDataResultCommand = clsPatterns.ReplaceAllValues(oDataResultCommand, PanelValidatorControl, True)
|
||||
oDatatableDataResult = ClassDatabase.Return_Datatable_ConId(oDataResultCommand, oConID, "Load_Additional_Searches1")
|
||||
End If
|
||||
If BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count > 0 Then
|
||||
'Check whether DocData is there
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
||||
oDocResultCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
||||
oDocResultCommand = clsPatterns.ReplaceAllValues(oDocResultCommand, pnldesigner, True)
|
||||
oDocResultCommand = clsPatterns.ReplaceAllValues(oDocResultCommand, PanelValidatorControl, True)
|
||||
oDatatableDocResult = ClassDatabase.Return_Datatable_ConId(oDocResultCommand, oConID, "Load_Additional_Searches2")
|
||||
End If
|
||||
|
||||
@ -535,7 +535,7 @@ Public Class frmValidator
|
||||
_frmValidatorSearch._DTSQLSearches = BASEDATA_DT_PROFILE_SEARCHES_SQL
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
|
||||
|
||||
_frmValidatorSearch.Refresh_Load_GridSQL(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("TAB_TITLE"))
|
||||
End If
|
||||
@ -543,7 +543,7 @@ Public Class frmValidator
|
||||
_frmValidatorSearch._DTDocSearches = BASEDATA_DT_PROFILE_SEARCHES_DOC
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
|
||||
|
||||
_frmValidatorSearch.RefreshTabDoc(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("TAB_TITLE"))
|
||||
End If
|
||||
@ -601,7 +601,7 @@ Public Class frmValidator
|
||||
End If
|
||||
'oSql = clsPatterns.ReplaceUserValues(sqlStatement, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
'oSql = clsPatterns.ReplaceInternalValues(oSql)
|
||||
oSQLStatement = clsPatterns.ReplaceAllValues(oSQLStatement, pnldesigner, True)
|
||||
oSQLStatement = clsPatterns.ReplaceAllValues(oSQLStatement, PanelValidatorControl, True)
|
||||
If IsNothing(oSQLStatement) Then
|
||||
Continue For
|
||||
End If
|
||||
@ -712,7 +712,7 @@ Public Class frmValidator
|
||||
Sub Create_Controls()
|
||||
Dim oControlInfo As String
|
||||
Try
|
||||
pnldesigner.Controls.Clear()
|
||||
PanelValidatorControl.Controls.Clear()
|
||||
Dim oSQL = $"SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{USER_LANGUAGE}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, * FROM TBPM_PROFILE_CONTROLS WHERE CONTROL_ACTIVE = 1 AND PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY Y_LOC, X_LOC"
|
||||
DT_CONTROLS = DataASorDB.GetDatatable("DD_ECM", oSQL, "TBPM_PROFILE_CONTROLS_LANGUAGE", $"LANGUAGE = '{USER_LANGUAGE}' AND PROFIL_ID = {CURRENT_ProfilGUID}", "Y_LOC, X_LOC")
|
||||
|
||||
@ -753,14 +753,14 @@ Public Class frmValidator
|
||||
oControlInfo = $"CtrlID: {oControlID} - CtrlName: {oControlRow.Item("NAME")} - CtrlIndex: {oControlRow.Item("INDEX_NAME")}"
|
||||
Try
|
||||
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
|
||||
Case "TXT"
|
||||
Case ClassControlCreator.PREFIX_TEXTBOX
|
||||
Try
|
||||
oControlInfo = "TXT#" & oControlInfo
|
||||
oControlInfo = ClassControlCreator.PREFIX_TEXTBOX & "#" & oControlInfo
|
||||
LOGGER.Debug($"[{oControlInfo}] - TXT Try to create control...")
|
||||
|
||||
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
|
||||
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
|
||||
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
||||
|
||||
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
|
||||
oMyControl = txt
|
||||
LOGGER.Debug($"[{oControlInfo}] - TXT Created!!")
|
||||
@ -816,7 +816,7 @@ Public Class frmValidator
|
||||
If clsPatterns.HasOnlySimplePatterns(oSQL) Then
|
||||
LOGGER.Debug("SQL HasOnlySimplePatterns!")
|
||||
oSQL = clsPatterns.ReplaceInternalValues(oSQL)
|
||||
oSQL = clsPatterns.ReplaceControlValues(oSQL, pnldesigner, True)
|
||||
oSQL = clsPatterns.ReplaceControlValues(oSQL, PanelValidatorControl, True)
|
||||
Dim oDT As DataTable = ClassDatabase.Return_Datatable_ConId(oSQL, oCONID, $"CreateControls - oControlID: {oControlID}")
|
||||
If Not IsNothing(oDT) Then
|
||||
For Each oRow As DataRow In oDT.Rows
|
||||
@ -957,7 +957,7 @@ Public Class frmValidator
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oGrid = ClassControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False, pnldesigner)
|
||||
Dim oGrid = ClassControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False, PanelValidatorControl)
|
||||
|
||||
AddHandler oGrid.ProcessGridKey, Sub(ByVal _sender As Object, ByVal e As KeyEventArgs)
|
||||
If e.KeyCode = Keys.Tab Then
|
||||
@ -998,7 +998,7 @@ Public Class frmValidator
|
||||
oMyControl.TabIndex = oTabIndexCounter
|
||||
End If
|
||||
' oMyControl.Tag = CInt(oControlRow.Item("GUID"))
|
||||
pnldesigner.Controls.Add(oMyControl)
|
||||
PanelValidatorControl.Controls.Add(oMyControl)
|
||||
|
||||
oTabIndexCounter += 1
|
||||
Catch ex As Exception
|
||||
@ -1014,15 +1014,8 @@ Public Class frmValidator
|
||||
Next
|
||||
LOGGER.Debug("Create_Controls finished!")
|
||||
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Dim st As New StackTrace(True)
|
||||
st = New StackTrace(ex, True)
|
||||
'LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Create_Controls")
|
||||
LOGGER.Warn($"Unexpected Error in Create_Controls [{oControlInfo}] Line: {st.GetFrame(0).GetFileLineNumber().ToString} - {ex.Message}")
|
||||
LOGGER.Error(ex)
|
||||
If DEBUG = False Then MsgBox("Error CreateControls: " & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
allgFunk.Insert_LogEntry($"ERROR CreateControls >> {ex.Message}")
|
||||
End Try
|
||||
@ -1033,12 +1026,11 @@ Public Class frmValidator
|
||||
Dim oControlID = DirectCast(oMyGridView.GridControl.Tag, ClassControlCreator.ControlMetadata).Guid
|
||||
SaveDevExpressGridControl_Layout(CURRENT_ProfilGUID, oControlID, oMyGridView)
|
||||
Catch ex As Exception
|
||||
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Sub Clear_all_Input()
|
||||
For Each inctrl As Control In Me.pnldesigner.Controls
|
||||
For Each inctrl As Control In Me.PanelValidatorControl.Controls
|
||||
Dim Type As String = inctrl.GetType.ToString
|
||||
Select Case Type
|
||||
Case "System.Windows.Forms.TextBox"
|
||||
@ -1084,6 +1076,8 @@ Public Class frmValidator
|
||||
If ofilteredData.Rows.Count = 1 Then
|
||||
Dynamic_SetControlData(oTextbox, ofilteredData.Rows(0))
|
||||
End If
|
||||
|
||||
ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
||||
End Sub
|
||||
Private Function GetControlID(ByVal PROFILEID As Integer, Controlname As String)
|
||||
For Each oROW As DataRow In DTVWCONTROL_INDEX.Rows
|
||||
@ -1117,7 +1111,7 @@ Public Class frmValidator
|
||||
Dim oConnectionId = oRow.Item("CONNECTION_ID")
|
||||
|
||||
If Not IsDBNull(oSqlStatement) And Not IsDBNull(oConnectionId) Then
|
||||
oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, pnldesigner, True)
|
||||
oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, PanelValidatorControl, True)
|
||||
|
||||
_dependingControl_in_action = True
|
||||
Depending_Control_Set_Result(oControlName, oSqlStatement, oConnectionId)
|
||||
@ -1132,45 +1126,7 @@ Public Class frmValidator
|
||||
|
||||
End If
|
||||
|
||||
If Not IsNothing(DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) AndAlso DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER.Rows.Count > 0 Then
|
||||
For Each oRow As DataRow In DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER.Rows
|
||||
Try
|
||||
Dim oControlId = oRow.Item("CONTROL_ID")
|
||||
Dim oSqlStatement = oRow.Item("SQL_COMMAND")
|
||||
Dim oConnectionId = oRow.Item("CONNECTION_ID")
|
||||
Dim oColumnName = oRow.Item("SPALTENNAME")
|
||||
Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP")
|
||||
|
||||
If Not IsDBNull(oSqlStatement) And Not IsDBNull(oSqlStatement) Then
|
||||
oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, pnldesigner, True)
|
||||
|
||||
ClassControlCreator.GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSqlStatement, oConnectionId, oAdvancedLookup)
|
||||
|
||||
|
||||
' === Block to force setting the editor for GridColumns
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
Try
|
||||
Dim oMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
|
||||
If oMeta.Guid = oControlId AndAlso TypeOf oControl Is GridControl Then
|
||||
Dim oGrid As GridControl = DirectCast(oControl, GridControl)
|
||||
DirectCast(oGrid.FocusedView, GridView).FocusInvalidRow()
|
||||
Exit For
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
' === End
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in Display SQL result for grid column: " & oRow.Item("CONTROL_ID") & " - ERROR: " & ex.Message)
|
||||
End Try
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
@ -1203,8 +1159,8 @@ Public Class frmValidator
|
||||
If IsNothing(Override_SQLCommand) Then
|
||||
Override_SQLCommand = ""
|
||||
End If
|
||||
oSQL = clsPatterns.ReplaceAllValues(oSQL, pnldesigner, True)
|
||||
Override_SQLCommand = clsPatterns.ReplaceAllValues(Override_SQLCommand, pnldesigner, True)
|
||||
oSQL = clsPatterns.ReplaceAllValues(oSQL, PanelValidatorControl, True)
|
||||
Override_SQLCommand = clsPatterns.ReplaceAllValues(Override_SQLCommand, PanelValidatorControl, True)
|
||||
Dim oDT_ACTIONS As DataTable = Database_ECM.GetDatatable(oSQL) ', "onCustomButtonClick")
|
||||
If IsNothing(oDT_ACTIONS) Then
|
||||
MsgBox("Something went wrong in custom action - Please check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
||||
@ -1350,17 +1306,17 @@ Public Class frmValidator
|
||||
For Each row1 As DataRow In resultDT.Rows
|
||||
Dim result = row1.Item(0)
|
||||
If Not IsNothing(result) Then
|
||||
pnldesigner.Controls(displayboxname).Text = result.ToString
|
||||
PanelValidatorControl.Controls(displayboxname).Text = result.ToString
|
||||
|
||||
Exit For
|
||||
Else
|
||||
pnldesigner.Controls(displayboxname).Text = "RESULT = NOTHING"
|
||||
PanelValidatorControl.Controls(displayboxname).Text = "RESULT = NOTHING"
|
||||
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
pnldesigner.Controls(displayboxname).Text = "NO RESULT"
|
||||
PanelValidatorControl.Controls(displayboxname).Text = "NO RESULT"
|
||||
|
||||
End If
|
||||
|
||||
@ -1404,14 +1360,15 @@ Public Class frmValidator
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub LookupListChanged(sender As Object, SelectedValues As List(Of String))
|
||||
|
||||
If FormLoaded = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
LOGGER.Debug("LookupListChanged")
|
||||
Dim oLookup As RepositoryItemLookupControl3 = sender
|
||||
|
||||
Try
|
||||
Dim oLookup As RepositoryItemLookupControl3 = sender
|
||||
listChangedLookup.Add(oLookup.Name)
|
||||
|
||||
ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
@ -1428,6 +1385,8 @@ Public Class frmValidator
|
||||
CheckBox_DependingControls(oCheckbox)
|
||||
Checkbox_EnablingControls(oCheckbox)
|
||||
CheckBox_DependingColumn(oCheckbox)
|
||||
ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
||||
|
||||
Dim oCONTROL_ID = DirectCast(oCheckbox.Tag, ClassControlCreator.ControlMetadata).Guid
|
||||
Dim ofilteredData As DataTable = DT_CONTROLS.Clone()
|
||||
Dim oExpression = $"GUID = {oCONTROL_ID} and Len(SET_CONTROL_DATA) > 0"
|
||||
@ -1478,7 +1437,7 @@ Public Class frmValidator
|
||||
End If
|
||||
If Not IsDBNull(oDataRow.Item("CONNECTION_ID")) And Not IsDBNull(oDataRow.Item("SET_CONTROL_DATA")) Then
|
||||
Dim oSqlCommand = IIf(IsDBNull(oDataRow.Item("SET_CONTROL_DATA")), "", oDataRow.Item("SET_CONTROL_DATA"))
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
_SetControlValue_in_action = True
|
||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oDataRow.Item("CONNECTION_ID"), $"Dynamic_SetControlData-Control [{oControlID}-{oControlname2Set}]")
|
||||
For Each oRowControl2Set As DataRow In oDTDEPENDING_RESULT.Rows
|
||||
@ -1517,7 +1476,7 @@ Public Class frmValidator
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oControl2Set Then
|
||||
oFound = True
|
||||
LOGGER.Debug($"Got the Control22Set: {oControl2Set}..Setting the values..")
|
||||
@ -1607,7 +1566,7 @@ Public Class frmValidator
|
||||
End If
|
||||
If Not IsDBNull(oFilteredDatatable.Rows(0).Item("CONNECTION_ID")) And Not IsDBNull(oFilteredDatatable.Rows(0).Item("SET_CONTROL_DATA")) Then
|
||||
Dim oSqlCommand = IIf(IsDBNull(oFilteredDatatable.Rows(0).Item("SET_CONTROL_DATA")), "", oFilteredDatatable.Rows(0).Item("SET_CONTROL_DATA"))
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
_SetControlValue_in_action = True
|
||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oFilteredDatatable.Rows(0).Item("CONNECTION_ID"), $"SetControlValues - CTRLID {oControlID}")
|
||||
For Each oRowControl2Set As DataRow In oDTDEPENDING_RESULT.Rows
|
||||
@ -1646,7 +1605,7 @@ Public Class frmValidator
|
||||
Exit Sub
|
||||
End If
|
||||
'Dim oDependingLookup As LookupControl3 = pnldesigner.Controls.Find(oDEPENDING_CtrlName, False).FirstOrDefault()
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oControl2Set Then
|
||||
oFound = True
|
||||
LOGGER.Debug($"Got the Control22Set: {oControl2Set}..Setting the values..")
|
||||
@ -1732,13 +1691,13 @@ Public Class frmValidator
|
||||
End If
|
||||
If Not IsDBNull(oRowDependingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) Then
|
||||
Dim oSqlCommand = IIf(IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")), "", oRowDependingControl.Item("SQL_UEBERPRUEFUNG"))
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
_dependingControl_in_action = True
|
||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oRowDependingControl.Item("CONNECTION_ID"), $"LookupControl_DependingControls - oControlID: {oControlID}")
|
||||
Try
|
||||
Dim oFound As Boolean = False
|
||||
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then
|
||||
oFound = True
|
||||
LOGGER.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..")
|
||||
@ -1853,13 +1812,13 @@ Public Class frmValidator
|
||||
End If
|
||||
If Not IsDBNull(oRowDependingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) Then
|
||||
Dim oSqlCommand = IIf(IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")), "", oRowDependingControl.Item("SQL_UEBERPRUEFUNG"))
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
_dependingControl_in_action = True
|
||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oRowDependingControl.Item("CONNECTION_ID"), $"CheckBox_DependingControls - oControlID: {oControlID}")
|
||||
Try
|
||||
Dim oFound As Boolean = False
|
||||
'Dim oDependingLookup As LookupControl3 = pnldesigner.Controls.Find(oDEPENDING_CtrlName, False).FirstOrDefault()
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then
|
||||
oFound = True
|
||||
LOGGER.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..")
|
||||
@ -1969,7 +1928,7 @@ Public Class frmValidator
|
||||
If _dependingColumn_in_action = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
|
||||
_dependingColumn_in_action = True
|
||||
Try
|
||||
@ -1979,7 +1938,7 @@ Public Class frmValidator
|
||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID, $"LookupControl_DependingColumn - oDEPENDING_CONTROL_ID: {oDEPENDING_CONTROL_ID}")
|
||||
If Not IsNothing(oDTDEPENDING_RESULT) Then
|
||||
LOGGER.Debug($"Trying to fill the DropDown (DC) for ControlID [{oDEPENDING_CONTROL_ID}]..RowCount: [{oDTDEPENDING_RESULT.Rows.Count}] ")
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid
|
||||
|
||||
If oControlId = oDEPENDING_CONTROL_ID Then
|
||||
@ -2013,14 +1972,14 @@ Public Class frmValidator
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
|
||||
_dependingColumn_in_action = True
|
||||
Try
|
||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID, $"CheckBox_DependingColumn - oDEPENDING_CONTROL_ID: {oDEPENDING_CONTROL_ID}")
|
||||
If Not IsNothing(oDTDEPENDING_RESULT) Then
|
||||
LOGGER.Debug($"Trying to fill the DropDown (DC) for ControlID [{oDEPENDING_CONTROL_ID}]..RowCount: [{oDTDEPENDING_RESULT.Rows.Count}] ")
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid
|
||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_CONTROL_ID Then
|
||||
ClassControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup)
|
||||
@ -2061,7 +2020,7 @@ Public Class frmValidator
|
||||
_Step = 2
|
||||
Dim sql_Statement = IIf(IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")), "", ROW.Item("SQL_UEBERPRUEFUNG"))
|
||||
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, True)
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, PanelValidatorControl, True)
|
||||
_Step = 3
|
||||
|
||||
_dependingControl_in_action = True
|
||||
@ -2077,6 +2036,9 @@ Public Class frmValidator
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
|
||||
ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
||||
|
||||
Controls2beEnabled(oCombobox.Name)
|
||||
Dim ofilteredData As DataTable = DT_CONTROLS.Clone()
|
||||
Dim oExpression = $"GUID = {CONTROL_ID} and Len(SET_CONTROL_DATA) > 0"
|
||||
@ -2112,13 +2074,13 @@ Public Class frmValidator
|
||||
End If
|
||||
If Not IsDBNull(oRowEnablingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowEnablingControl.Item("SQL_ENABLE")) Then
|
||||
Dim oSqlCommand = IIf(IsDBNull(oRowEnablingControl.Item("SQL_ENABLE")), "", oRowEnablingControl.Item("SQL_ENABLE"))
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
_dependingControl_in_action = True
|
||||
Dim oENABLERESULT As Boolean = ClassDatabase.Execute_Scalar_ConID(oSqlCommand, oRowEnablingControl.Item("CONNECTION_ID"), $"Controls2beEnabled - oENABLE_CTRLID: {oENABLE_GUID}")
|
||||
Try
|
||||
Dim oFound As Boolean = False
|
||||
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oENABLE_GUID Then
|
||||
oFound = True
|
||||
LOGGER.Debug($"Got the depending control ID:{oENABLE_GUID}..Setting enabled/Disabled...")
|
||||
@ -2158,7 +2120,7 @@ Public Class frmValidator
|
||||
For Each oRowEnablingControl As DataRow In oFilteredDatatable.Rows
|
||||
Dim oENABLE_GUID = oRowEnablingControl.Item("GUID")
|
||||
Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME")
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
If oENABLE_GUID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid Then
|
||||
oControl.Enabled = False
|
||||
Exit For
|
||||
@ -2180,13 +2142,13 @@ Public Class frmValidator
|
||||
For Each oRowEnablingControl As DataRow In oFilteredDatatable.Rows
|
||||
Dim oENABLE_GUID = oRowEnablingControl.Item("GUID")
|
||||
Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME")
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
If oENABLE_GUID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid Then
|
||||
LOGGER.Debug($"Found the Control on panel which needs to be checked [{oENABLE_GUID}]...")
|
||||
Dim oSqlCommand = IIf(IsDBNull(oRowEnablingControl.Item("SQL_ENABLE_ON_LOAD")), "", oRowEnablingControl.Item("SQL_ENABLE_ON_LOAD"))
|
||||
Dim oConID = oRowEnablingControl.Item("SQL_ENABLE_ON_LOAD_CONID")
|
||||
If Not IsDBNull(oConID) Then
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
Dim oENABLERESULT As Boolean = ClassDatabase.Execute_Scalar_ConID(oSqlCommand, oRowEnablingControl.Item("SQL_ENABLE_ON_LOAD_CONID"), $"Controls2B_EnDisabled_on_Load - oENABLE_CTRLID: {oENABLE_GUID}")
|
||||
Try
|
||||
LOGGER.Debug($"oENABLERESULT [{oENABLERESULT}]...")
|
||||
@ -2224,7 +2186,7 @@ Public Class frmValidator
|
||||
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then
|
||||
LOGGER.Debug("Filling Combobox with Results")
|
||||
|
||||
Dim oCombobox As ComboBox = pnldesigner.Controls(displayboxname)
|
||||
Dim oCombobox As ComboBox = PanelValidatorControl.Controls(displayboxname)
|
||||
|
||||
If IsNothing(oCombobox) Then
|
||||
Exit Sub
|
||||
@ -2240,7 +2202,7 @@ Public Class frmValidator
|
||||
ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_LOOKUP) Then
|
||||
LOGGER.Debug("Filling Lookup Control with Results")
|
||||
|
||||
Dim oLookup As LookupControl3 = pnldesigner.Controls(displayboxname)
|
||||
Dim oLookup As LookupControl3 = PanelValidatorControl.Controls(displayboxname)
|
||||
|
||||
If IsNothing(oLookup) Then
|
||||
Exit Sub
|
||||
@ -2257,9 +2219,9 @@ Public Class frmValidator
|
||||
End If
|
||||
Else
|
||||
If oResultTable.Rows.Count = 1 Then
|
||||
pnldesigner.Controls(displayboxname).Text = oResultTable.Rows(0).Item(0).ToString
|
||||
PanelValidatorControl.Controls(displayboxname).Text = oResultTable.Rows(0).Item(0).ToString
|
||||
Else
|
||||
pnldesigner.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1"
|
||||
PanelValidatorControl.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1"
|
||||
LOGGER.Info(">> Datatable-SQL: " & sqlCommand)
|
||||
End If
|
||||
End If
|
||||
@ -2553,7 +2515,7 @@ Public Class frmValidator
|
||||
|
||||
FillIndexValues(first)
|
||||
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
LoadSQLData(oControl, DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid)
|
||||
Next
|
||||
|
||||
@ -2639,7 +2601,7 @@ Public Class frmValidator
|
||||
SplitContainer1.Panel2Collapsed = False
|
||||
End Sub
|
||||
Sub activate_controls(status As Boolean)
|
||||
Me.pnldesigner.Enabled = status
|
||||
Me.PanelValidatorControl.Enabled = status
|
||||
Me.btnSave.Enabled = status
|
||||
End Sub
|
||||
Private Function Windream_get_Doc_info()
|
||||
@ -2949,7 +2911,7 @@ Public Class frmValidator
|
||||
Try
|
||||
If DTVWCONTROL_INDEX.Rows.Count > 0 Then
|
||||
Dim oCount As Integer = 0
|
||||
For Each oControl As Control In Me.pnldesigner.Controls
|
||||
For Each oControl As Control In Me.PanelValidatorControl.Controls
|
||||
If SingleAttribute <> "" Then
|
||||
oIDBOverride = True
|
||||
If SingleAttribute <> oControl.Name Then
|
||||
@ -3537,13 +3499,13 @@ Public Class frmValidator
|
||||
Dim oSqlCommand = oRow.Item("SQL_COMMAND")
|
||||
Dim oCONNID = oRow.Item("CONNECTION_ID")
|
||||
Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP")
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, True)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True)
|
||||
|
||||
Try
|
||||
Dim oDTRESULT_FOR_COLUMN As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID, $"oDEPENDING_CTRL_ID: {oDEPENDING_CTRL_ID}")
|
||||
If Not IsNothing(oDTRESULT_FOR_COLUMN) Then
|
||||
LOGGER.Debug($"Trying to create a DropDown(FIV) for CONTROL-ID [{oDEPENDING_CTRL_ID}] - RowCount: [{oDTRESULT_FOR_COLUMN.Rows.Count}] ")
|
||||
For Each oControl As Control In pnldesigner.Controls
|
||||
For Each oControl As Control In PanelValidatorControl.Controls
|
||||
Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid
|
||||
If oControlId = oDEPENDING_CTRL_ID Then
|
||||
ClassControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup)
|
||||
@ -3726,7 +3688,7 @@ Public Class frmValidator
|
||||
|
||||
Private Function ForceGridValidation()
|
||||
Dim oValidation As Boolean = True
|
||||
Dim oGrids = (From oControl In pnldesigner.Controls
|
||||
Dim oGrids = (From oControl In PanelValidatorControl.Controls
|
||||
Where TypeOf oControl Is GridControl
|
||||
Select oControl).ToList()
|
||||
|
||||
@ -3753,7 +3715,7 @@ Public Class frmValidator
|
||||
Private Function btnFinish_continue()
|
||||
Try
|
||||
Dim oSQL = PROFIL_FINISH_SQL
|
||||
oSQL = clsPatterns.ReplaceAllValues(oSQL, pnldesigner, True)
|
||||
oSQL = clsPatterns.ReplaceAllValues(oSQL, PanelValidatorControl, True)
|
||||
|
||||
Dim oDT_ACTIONS As DataTable = Database_ECM.GetDatatable(oSQL)
|
||||
If IsNothing(oDT_ACTIONS) Then
|
||||
@ -3859,7 +3821,7 @@ Public Class frmValidator
|
||||
Dim oGUID = oFinalIndexRow.Item("GUID")
|
||||
Dim oSQLCommand = oFinalIndexRow.Item("SQL_COMMAND")
|
||||
Dim oConnectionID = oFinalIndexRow.Item("CONNECTION_ID")
|
||||
oSQLCommand = clsPatterns.ReplaceAllValues(oSQLCommand, pnldesigner, True)
|
||||
oSQLCommand = clsPatterns.ReplaceAllValues(oSQLCommand, PanelValidatorControl, True)
|
||||
If IsNothing(oSQLCommand) Then
|
||||
errormessage = "Error while replacing Values in final indexing - Check the log"
|
||||
My.Settings.Save()
|
||||
@ -4020,7 +3982,7 @@ Public Class frmValidator
|
||||
CTRL_ID = CTRL_ID.Replace("CTRLID", "")
|
||||
Dim value_from_control
|
||||
If IsNumeric(CTRL_ID) Then
|
||||
For Each oControl As Control In Me.pnldesigner.Controls
|
||||
For Each oControl As Control In Me.PanelValidatorControl.Controls
|
||||
Try
|
||||
If IsNothing(DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid) Then
|
||||
Continue For
|
||||
@ -4284,7 +4246,7 @@ Public Class frmValidator
|
||||
Try
|
||||
Dim oMissing As Boolean = False
|
||||
'Jedes Control auf panel durchlaufen
|
||||
For Each oControl As Control In Me.pnldesigner.Controls
|
||||
For Each oControl As Control In Me.PanelValidatorControl.Controls
|
||||
'Der input der Box,Cmb muss jedes mal geleert werden
|
||||
Dim oMyInput As String = ""
|
||||
'Jedes Control in Konfig Tab durchlaufn
|
||||
@ -5699,7 +5661,7 @@ Public Class frmValidator
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem6_ItemClick_2(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem6.ItemClick
|
||||
For Each oControl In pnldesigner.Controls
|
||||
For Each oControl In PanelValidatorControl.Controls
|
||||
If TypeOf oControl Is GridControl Then
|
||||
Dim oGrid = DirectCast(oControl, GridControl)
|
||||
Dim oView = DirectCast(oGrid.FocusedView, GridView)
|
||||
|
||||
@ -414,7 +414,7 @@ Public Class frmValidatorSearch
|
||||
If IsNothing(_DTSQLSearches) Then Exit Sub
|
||||
Dim oConID = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("CONN_ID")
|
||||
Dim oCommand = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.PanelValidatorControl, True)
|
||||
Dim oTabIndex = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("TAB_INDEX")
|
||||
Dim oTabCaption = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("TAB_TITLE")
|
||||
RefreshTabSQL(oConID, oCommand, oTabIndex, oTabCaption)
|
||||
@ -423,7 +423,7 @@ Public Class frmValidatorSearch
|
||||
If IsNothing(_DTDocSearches) Then Exit Sub
|
||||
Dim oConID = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("CONN_ID")
|
||||
Dim oCommand = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.PanelValidatorControl, True)
|
||||
Dim oTabIndex = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("TAB_INDEX")
|
||||
Dim oTabCaption = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("TAB_TITLE")
|
||||
RefreshTabDoc(oConID, oCommand, oTabIndex, oTabCaption)
|
||||
@ -614,7 +614,7 @@ Public Class frmValidatorSearch
|
||||
_DTSQLSearches = BASEDATA_DT_PROFILE_SEARCHES_SQL
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.PanelValidatorControl, True)
|
||||
XtraTabControlSQL.SelectedTabPageIndex = 0
|
||||
Refresh_Load_GridSQL(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("TAB_TITLE"))
|
||||
End If
|
||||
@ -622,7 +622,7 @@ Public Class frmValidatorSearch
|
||||
_DTDocSearches = BASEDATA_DT_PROFILE_SEARCHES_DOC
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.PanelValidatorControl, True)
|
||||
XtraTabControlDocs.SelectedTabPageIndex = 0
|
||||
RefreshTabDoc(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("TAB_TITLE"))
|
||||
End If
|
||||
@ -639,7 +639,7 @@ Public Class frmValidatorSearch
|
||||
Dim oTabIndex = XtraTabControlDocs.SelectedTabPageIndex
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(oTabIndex).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(oTabIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.PanelValidatorControl, True)
|
||||
RefreshTabDoc(oConID, oCommand, oTabIndex, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(oTabIndex).Item("TAB_TITLE"))
|
||||
End Sub
|
||||
|
||||
@ -671,7 +671,7 @@ Public Class frmValidatorSearch
|
||||
Dim oTabIndex = XtraTabControlSQL.SelectedTabPageIndex
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(oTabIndex).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(oTabIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, True)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.PanelValidatorControl, True)
|
||||
RefreshTabSQL(oConID, oCommand, oTabIndex, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(oTabIndex).Item("TAB_TITLE"))
|
||||
End Sub
|
||||
|
||||
|
||||
@ -118,6 +118,7 @@
|
||||
<File Id="DDLibStandards" Name="DD_LIB_Standards.dll" Source="P:\Visual Studio Projekte\Bibliotheken\DD_LIB_Standards.dll"/>
|
||||
<File Id="LookupGrid" Name="DigitalData.Controls.LookupGrid.dll" Source="DigitalData.Controls.LookupGrid.dll"/>
|
||||
<File Id="DDSnapPanel" Name="DigitalData.Controls.SnapPanel.dll" Source="DigitalData.Controls.SnapPanel.dll"/>
|
||||
<File Id="DDCommonGUIs" Name="DigitalData.GUIs.Common.dll" Source="DigitalData.GUIs.Common.dll"/>
|
||||
<File Id="DDConfig" Name="DigitalData.Modules.Config.dll" Source="DigitalData.Modules.Config.dll"/>
|
||||
<File Id="DDLogging" Name="DigitalData.Modules.Logging.dll" Source="DigitalData.Modules.Logging.dll"/>
|
||||
<File Id="DDLanguage" Name="DigitalData.Modules.Language.dll" Source="DigitalData.Modules.Language.dll"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user