msErrorClassControlBuilder

This commit is contained in:
Digital Data - Marlon Schreiber 2017-10-05 13:59:18 +02:00
parent e8c06c46a7
commit 2bc716b601
4 changed files with 17 additions and 15 deletions

View File

@ -350,6 +350,7 @@ Public Class ClassControlBuilder
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> DependingControls - For Each row As DataRow In TableResult.Rows", False, False)
For Each row As DataRow In TableResult.Rows
Dim sqlcommand As String = row.Item("SQL_COMMAND_1")
@ -374,31 +375,31 @@ Public Class ClassControlBuilder
Else
' & upd & "'")
End If
'Dim upd1 = String.Format("UPDATE TBPMO_CONTROL_VALUE SET VALUE = '{0}',CHANGE_STEP = {1},CHANGED_WHO = '{2}' WHERE CONTROL_ID = {3} AND RECORD_ID = {4}", _
' value.ToString, CURRENT_CHANGE_STEP, USER_USERNAME, CONTROL_ID, CURRENT_RECORD_ID)
'If ClassDatabase.Execute_non_Query(upd1) = False Then
'End If
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> ctrlvalID is Nothing - Attention.....", False, False)
If CURRENT_RECORD_ID <> 0 Then
If ClassControlCommandsUI.InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, value, CURRENT_ENTITY_ID) = False Then
ClassLogger.Add(" >> Check Insert depending control (XXX) value as it was nothing and Insert was not successful", False)
End If
End If
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Value was nothing - Inserted the ControlValue '" & ins & "'")
'End If
End If
End If
' DependingControlId bezeichnet das Control, das die Abhängigkeit enthält
Dim dependingControlId As Integer = row.Item("GUID")
If dependingControlId > 0 Then
If LogErrorsOnly = False Then ClassLogger.Add(">> dependingControlId: " + dependingControlId.ToString, False, False)
End If
Dim panel As Panel = Me.MasterPanel
'Dim panel As Panel = DirectCast(control.Parent, Panel)
' Über die Id das Control finden
Dim dependingControl As Control = panel.Controls.OfType(Of Control)().Where(Function(c As Control)
Return DirectCast(c.Tag, ClassControlMetadata).Id = dependingControlId
End Function).SingleOrDefault()
If IsNothing(dependingControl) Then
ClassLogger.Add(">> dependingControl is Nothing - Attention.....", True)
Continue For
End If
sqlcommand = sqlcommand.Replace(match.Groups(1).Value, value)
If LogErrorsOnly = False Then ClassLogger.Add(" >> " & String.Format("Executing SQL_COMMAND: '{0}' for controlID '{1}'", sqlcommand, dependingControlId), False)
@ -456,7 +457,11 @@ Public Class ClassControlBuilder
Case "CustomComboBox"
ControlLoader.Combobox.SetDataSource(DirectCast(dependingControl, CustomComboBox), dt)
Case "CheckedListBoxControl"
If LogErrorsOnly = False Then ClassLogger.Add(" >> DependingControls - CheckedListBoxControl", False, False)
Dim checkedlistbox = DirectCast(dependingControl, DevExpress.XtraEditors.CheckedListBoxControl)
If IsNothing(checkedlistbox) Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> checkedlistbox is Nothing - Attention.....", False, False)
End If
ControlLoader.CheckedListBox.SetDataSource(checkedlistbox, dt)
' Hier werden nun evtl schon gesetzte Werte für CheckedListBox angehakt
@ -465,9 +470,6 @@ Public Class ClassControlBuilder
Where row1.Item("CONTROL_ID") = dependingControlId
Select row1.Item("VALUE")).ToList()
'ClassControlValues.LoadControlValue(CURRENT_RECORD_ID, CURRENT_PARENT_RECORD_ID, dependingControlId, dependingControl, values, CURRENT_ENTITY_ID)
ControlLoader.CheckedListBox.LoadValue(checkedlistbox, values)
If IsEdit Or IsInsert Then
CURRENT_RECORD_ENABLED = True

View File

@ -587,7 +587,7 @@ Public Class ClassControlCommandsUI
Dim converted_value = Check_and_Format_Value(ControlId, RecordId, _addValue)
If Not IsNothing(converted_value) Then
ClassControlCommandsUI.InsertControlValue(ControlId, RecordId, converted_value, CURRENT_ENTITY_ID)
'Dim ins = String.Format("INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE,ADDED_WHO) VALUES({0}, {1}, '{2}','{3}')", ControlId, RecordId, converted_value, USER_USERNAME)
'ClassDatabase.Execute_non_Query(ins)
'ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(CURRENT_ENTITY_ID, ControlId, RecordId, converted_value)

View File

@ -1,4 +1 @@
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.2, Version=15.2.16.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.2, Version=15.2.15.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v15.2, Version=15.2.16.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v15.2, Version=15.2.16.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@ -453,6 +453,9 @@ Public Class frmRecordView
End Try
Me.BringToFront()
If JUMP_RECORD_ID <> 0 Then
JUMP_RECORD_ID = 0
End If
End Sub
Private Sub GridViewDoc_Search_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs)