Compare commits
6 Commits
bca0002134
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
574c13c9ab | ||
|
|
966d3f404d | ||
|
|
0e2bef27a4 | ||
|
|
ffa97402ff | ||
|
|
8d6a5500a9 | ||
|
|
74863a6914 |
@@ -33,6 +33,8 @@ Public Module ModuleControlProperties
|
||||
<Category(ClassConstants.CAT_GENERAL)>
|
||||
Public Property Name() As String
|
||||
|
||||
<Category(ClassConstants.CAT_BEHAVIOUR)>
|
||||
Public Property Active() As Boolean
|
||||
|
||||
<Category(ClassConstants.CAT_DISPLAY)>
|
||||
Public Property Location() As Point
|
||||
@@ -120,9 +122,6 @@ Public Module ModuleControlProperties
|
||||
Private _default_value
|
||||
Friend _set_control_data As String
|
||||
|
||||
<Category(ClassConstants.CAT_BEHAVIOUR)>
|
||||
Public Property Active() As Boolean
|
||||
|
||||
<Category(ClassConstants.CAT_VALIDATION)>
|
||||
Public Property Required() As Boolean
|
||||
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.9.6.0")>
|
||||
<Assembly: AssemblyVersion("2.9.7.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
<Assembly: NeutralResourcesLanguage("")>
|
||||
|
||||
@@ -186,7 +186,10 @@ Public Class frmFormDesigner
|
||||
End Function
|
||||
|
||||
Private Function IsNotBooleanIndex(IndexName As String) As Boolean
|
||||
Dim oType As Integer '= WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Dim oType As Integer
|
||||
If IndexName = "@@DISPLAY_ONLY" Then
|
||||
Return 0
|
||||
End If
|
||||
If IDB_ACTIVE = False Then
|
||||
oType = WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Else
|
||||
@@ -196,7 +199,10 @@ Public Class frmFormDesigner
|
||||
End Function
|
||||
|
||||
Private Function IsNotDateIndex(IndexName As String) As Boolean
|
||||
Dim oType As Integer '= WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Dim oType As Integer
|
||||
If IndexName = "@@DISPLAY_ONLY" Then
|
||||
Return 0
|
||||
End If
|
||||
If IDB_ACTIVE = False Then
|
||||
oType = WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Else
|
||||
@@ -206,7 +212,10 @@ Public Class frmFormDesigner
|
||||
End Function
|
||||
|
||||
Private Function IsNotVectorBooleanIndex(IndexName As String) As Boolean
|
||||
Dim oType As Integer '= WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Dim oType As Integer
|
||||
If IndexName = "@@DISPLAY_ONLY" Then
|
||||
Return 0
|
||||
End If
|
||||
If IDB_ACTIVE = False Then
|
||||
oType = WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Else
|
||||
@@ -216,7 +225,10 @@ Public Class frmFormDesigner
|
||||
End Function
|
||||
|
||||
Private Function IsNotVectorDateIndex(IndexName As String) As Boolean
|
||||
Dim oType As Integer '= WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Dim oType As Integer
|
||||
If IndexName = "@@DISPLAY_ONLY" Then
|
||||
Return 0
|
||||
End If
|
||||
If IDB_ACTIVE = False Then
|
||||
oType = WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Else
|
||||
@@ -226,7 +238,10 @@ Public Class frmFormDesigner
|
||||
End Function
|
||||
|
||||
Private Function IsNotVectorDatetimeIndex(IndexName As String) As Boolean
|
||||
Dim oType As Integer '= WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Dim oType As Integer
|
||||
If IndexName = "@@DISPLAY_ONLY" Then
|
||||
Return 0
|
||||
End If
|
||||
If IDB_ACTIVE = False Then
|
||||
oType = WINDREAM_MOD.GetIndexType(IndexName)
|
||||
Else
|
||||
@@ -589,7 +604,7 @@ Public Class frmFormDesigner
|
||||
obj.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT"))
|
||||
obj.ChangedAt = ClassAllgemeineFunktionen.NotNullDate(row.Item("CHANGED_WHEN"), Nothing)
|
||||
obj.ChangedWho = ClassAllgemeineFunktionen.NotNullString(row.Item("CHANGED_WHO"), "")
|
||||
|
||||
obj.Active = StrToBool(row.Item("CONTROL_ACTIVE"))
|
||||
Dim oStyle As FontStyle = ClassAllgemeineFunktionen.NotNullString(row.Item("FONT_STYLE"), FontStyle.Regular)
|
||||
Dim oSize As Single = ClassAllgemeineFunktionen.NotNullString(row.Item("FONT_SIZE"), 10)
|
||||
Dim oFamilyString As String = ClassAllgemeineFunktionen.NotNullString(row.Item("FONT_FAMILY"), "Arial")
|
||||
|
||||
@@ -2134,6 +2134,12 @@ Public Class frmMain
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Reset_Current()
|
||||
CURRENT_JUMP_DOC_GUID = 0
|
||||
CURRENT_DOC_GUID = 0
|
||||
CURRENT_DOC_ID = 0
|
||||
End Sub
|
||||
|
||||
Private Async Function Item_Scope(startedFrom As String) As Task
|
||||
' ========== FRÜHE VALIDIERUNGEN (VOR UI-ÄNDERUNGEN) ==========
|
||||
If Application.OpenForms().OfType(Of frmValidator).Any Then
|
||||
@@ -2392,6 +2398,7 @@ Public Class frmMain
|
||||
' GRUPPE: Workflow ohne spezifisches Dokument
|
||||
CURRENT_JUMP_DOC_GUID = 0
|
||||
CURRENT_DOC_GUID = 0
|
||||
CURRENT_DOC_ID = 0
|
||||
CURRENT_ProfilGUID = CURRENT_CLICKED_PROFILE_ID
|
||||
LOGGER.Debug($"Item_Scope: hitInfo.InGroupRow...CURRENT_CLICKED_PROFILE_ID [{CURRENT_CLICKED_PROFILE_ID}]")
|
||||
Load_Profil_from_Grid(CURRENT_CLICKED_PROFILE_ID)
|
||||
|
||||
@@ -813,7 +813,9 @@ Public Class frmValidator
|
||||
|
||||
Try
|
||||
Dim oSQL As String
|
||||
oSQL = $"DELETE FROM TBPM_DOCWALKOVER WHERE UserID = {USER_ID};"
|
||||
oSQL = $"DELETE FROM TBPM_DOCWALKOVER WHERE UserID = {USER_ID};" & vbCrLf &
|
||||
$"DELETE FROM TBPM_VALIDATION_PROFILE_GROUP_USER WHERE UserID = {USER_ID};" & vbCrLf &
|
||||
$"DELETE FROM TBTF_PROFILE_FILES_WORK WHERE Action_UserID = {USER_ID};"
|
||||
DatabaseFallback.ExecuteNonQueryECM(oSQL)
|
||||
Catch ex As Exception
|
||||
MyValidationLogger.Error(ex)
|
||||
@@ -5304,8 +5306,8 @@ Public Class frmValidator
|
||||
oValueFromSource = GetVariableValuefromSource(oSourceIndexName, oIDBTyp, oIDBOverride)
|
||||
End If
|
||||
|
||||
If oValueFromSource Is Nothing Then
|
||||
MyValidationLogger.Debug($"oMyComboBox {oMyCombobox.Name} - Indexvalue from index {oSourceIndexName}: Nothing")
|
||||
If oValueFromSource Is Nothing Or IsDBNull(oValueFromSource) Then
|
||||
MyValidationLogger.Debug($"oMyComboBox {oMyCombobox.Name} - Indexvalue from index {oSourceIndexName} is Nothing or DBNull")
|
||||
If oDefaultValue = String.Empty Then
|
||||
MyValidationLogger.Debug($"oMyComboBox {oMyCombobox.Name}-defaultValue wurde nicht gefunden")
|
||||
oMyCombobox.SelectedIndex = -1
|
||||
@@ -5806,19 +5808,19 @@ Public Class frmValidator
|
||||
oNewValues = New List(Of String) From {oValueFromSource.ToString}
|
||||
End If
|
||||
Else
|
||||
' ========== BUGFIX START: Wenn KEIN neuer Wert, alte Werte behalten ==========
|
||||
If hadPreviousSelection AndAlso previousSelectedValues IsNot Nothing AndAlso previousSelectedValues.Count > 0 Then
|
||||
MyValidationLogger.Debug($"[FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: Kein neuer Wert von Quelle → alte Werte BEHALTEN")
|
||||
oNewValues = previousSelectedValues
|
||||
ElseIf oDefaultValue <> String.Empty Then
|
||||
MyValidationLogger.Debug($"[FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: Keine alten Werte, verwende DefaultValue = [{oDefaultValue}]")
|
||||
' ========== BUGFIX START: Wenn KEIN neuer Wert, SelectedValues LÖSCHEN ==========
|
||||
If oDefaultValue <> String.Empty Then
|
||||
MyValidationLogger.Debug($"[FillIndexValues] Lookup [{oLookupMeta.Name}]: Verwende DefaultValue = [{oDefaultValue}]")
|
||||
oNewValues = oDefaultValue.Split(",").ToList()
|
||||
Else
|
||||
MyValidationLogger.Debug($"[FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: KEINE Werte (oValueFromSource=Nothing, oDefaultValue leer, keine vorherigen Werte)")
|
||||
' WICHTIG: Keine alten Werte mehr übernehmen! → oNewValues bleibt Nothing
|
||||
MyValidationLogger.Debug($"[FillIndexValues] Lookup [{oLookupMeta.Name}]: Kein Index-Wert vorhanden → SelectedValues werden gelöscht")
|
||||
oNewValues = Nothing
|
||||
End If
|
||||
' ========== BUGFIX END: Wert-Beibehaltung ==========
|
||||
' ========== BUGFIX END: Alte Werte werden NICHT mehr beibehalten ==========
|
||||
End If
|
||||
|
||||
|
||||
' ========== KRITISCH: DataSource-Backup erstellen BEVOR SelectedValues gelöscht wird ==========
|
||||
Dim savedDataSource = oLookup.Properties.DataSource
|
||||
MyValidationLogger.Debug($"[FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: DataSource-Backup erstellt")
|
||||
@@ -7084,13 +7086,18 @@ Public Class frmValidator
|
||||
Case oControl.GetType = GetType(LookupControl3)
|
||||
Try
|
||||
Dim lookup As LookupControl3 = oControl
|
||||
If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Pflichtfeld: Keine Auswahl getroffen in LookupGrid '{oControl.Name}'"
|
||||
MyValidationLogger.Warn($"⚠️ {oErrMsgMissingInput}")
|
||||
oControl.BackColor = Color.Red
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True Then
|
||||
If pRegularComplete = False Then
|
||||
MyValidationLogger.Debug($"[CHECK_UPDATE] LookupGrid '{oControl.Name}' is required but has no selection. Skipping due to pRegularComplete=False.")
|
||||
Continue For
|
||||
Else
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Pflichtfeld: Keine Auswahl getroffen in LookupGrid '{oControl.Name}'"
|
||||
MyValidationLogger.Warn($"⚠️ {oErrMsgMissingInput}")
|
||||
oControl.BackColor = Color.Red
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
If lookup.Properties.MultiSelect = True Then
|
||||
Dim oLookupRows As Integer = lookup.Properties.SelectedValues.Count
|
||||
@@ -7142,14 +7149,20 @@ Public Class frmValidator
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
' Single-Select Lookup
|
||||
oMyInput = lookup.Properties.SelectedValues.FirstOrDefault()
|
||||
If IsNothing(oMyInput) And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Could not get FirstOrDefault-Value of LookUpGrid! - LookUPGridName: {lookup.Name}"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
If IsNothing(oMyInput) And oIsRequired = True Then
|
||||
If pRegularComplete = False Then
|
||||
MyValidationLogger.Debug($"[CHECK_UPDATE] LookupGrid(SingleSelect) '{lookup.Name}' is required but has no selection. Skipping due to pRegularComplete=False.")
|
||||
Continue For
|
||||
Else
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Could not get FirstOrDefault-Value of LookUpGrid! - LookUPGridName: {lookup.Name}"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
End If
|
||||
ElseIf IsNothing(oMyInput) And oIsRequired = False Then
|
||||
For Each ochangedLookub In listChangedLookup
|
||||
If lookup.Name = ochangedLookub Then
|
||||
@@ -7280,13 +7293,18 @@ Public Class frmValidator
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
oControl.BackColor = Color.Red
|
||||
frmError.ShowDialog()
|
||||
Exit For
|
||||
If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True Then
|
||||
If pRegularComplete = False Then
|
||||
MyValidationLogger.Debug($"[CHECK_UPDATE] TextEdit '{oControl.Name}' is required but has no selection. Skipping due to pRegularComplete=False.")
|
||||
Continue For
|
||||
Else
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
oControl.BackColor = Color.Red
|
||||
frmError.ShowDialog()
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
MyValidationLogger.Debug("Reading current value from Textbox")
|
||||
Dim oTextEdit As BaseEdit = DirectCast(oControl, BaseEdit)
|
||||
@@ -7410,16 +7428,21 @@ Public Class frmValidator
|
||||
Try
|
||||
MyValidationLogger.Debug($"Working on Combobox...")
|
||||
Dim cmb As Windows.Forms.ComboBox = oControl
|
||||
If cmb.SelectedIndex = -1 And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please Choose an entry out of ComboBox '" & cmb.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
If cmb.SelectedIndex = -1 And oIsRequired = True Then
|
||||
If pRegularComplete = False Then
|
||||
MyValidationLogger.Debug($"[CHECK_UPDATE] ComboBox '{cmb.Name}' is required but has no selection. Skipping due to pRegularComplete=False.")
|
||||
Continue For
|
||||
Else
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please Choose an entry out of ComboBox '" & cmb.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
Else
|
||||
oMyInput = cmb.Text
|
||||
MyValidationLogger.Debug($"inputvalue Combobox: {cmb.Text}")
|
||||
@@ -7545,16 +7568,21 @@ Public Class frmValidator
|
||||
Case oControl.GetType = GetType(DateTimePicker)
|
||||
Try
|
||||
Dim dtp As DateTimePicker = oControl
|
||||
If oIsRequired = True And dtp.Value.ToString = String.Empty And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please Choose DateValue for field'" & dtp.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
If oIsRequired = True And dtp.Value.ToString = String.Empty Then
|
||||
If pRegularComplete = False Then
|
||||
MyValidationLogger.Debug($"[CHECK_UPDATE] DateTimePicker '{dtp.Name}' is required but has no selection. Skipping due to pRegularComplete=False.")
|
||||
Continue For
|
||||
Else
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please Choose DateValue for field'" & dtp.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
ElseIf dtp.Value.ToString <> "01.01.0001 00:00:00" Then
|
||||
oMyInput = CDate(dtp.Value)
|
||||
Dim oObjectValue
|
||||
@@ -7641,16 +7669,21 @@ Public Class frmValidator
|
||||
Dim chk As CheckBox = oControl
|
||||
oMyInput = chk.Checked.ToString
|
||||
|
||||
If chk.CheckState = CheckState.Indeterminate And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please set Checkbox value for field '" & chk.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
If chk.CheckState = CheckState.Indeterminate And oIsRequired = True Then
|
||||
If pRegularComplete = False Then
|
||||
MyValidationLogger.Debug($"[CHECK_UPDATE] CheckBox '{chk.Name}' is required but has no selection. Skipping due to pRegularComplete=False.")
|
||||
Continue For
|
||||
Else
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please set Checkbox value for field '" & chk.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim WertWD As String
|
||||
@@ -7759,16 +7792,21 @@ Public Class frmValidator
|
||||
Zeilen += 1
|
||||
End If
|
||||
Next
|
||||
If oIsRequired = True And Zeilen = 0 And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Fehlende Eingabe in Vektorfeld '" & dgv.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
If oIsRequired = True And Zeilen = 0 Then
|
||||
If pRegularComplete = False Then
|
||||
MyValidationLogger.Debug($"[CHECK_UPDATE] DataGridView '{dgv.Name}' is required but has no selection. Skipping due to pRegularComplete=False.")
|
||||
Continue For
|
||||
Else
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Fehlende Eingabe in Vektorfeld '" & dgv.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
If _FormClosing Then
|
||||
MyValidationLogger.Warn("Form closing - skip error dialog")
|
||||
Return False
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
End If
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
ElseIf Zeilen > 0 Then
|
||||
Dim ZeilenGrid As Integer = 0
|
||||
Dim myVektorArr As String()
|
||||
|
||||
Reference in New Issue
Block a user