Compare commits
9 Commits
cee6a11c99
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
574c13c9ab | ||
|
|
966d3f404d | ||
|
|
0e2bef27a4 | ||
|
|
ffa97402ff | ||
|
|
8d6a5500a9 | ||
|
|
74863a6914 | ||
|
|
bca0002134 | ||
|
|
b5ae672091 | ||
|
|
107a47a97e |
@@ -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")
|
||||
@@ -906,7 +921,8 @@ Public Class frmFormDesigner
|
||||
UpdateSingleValue("REGEX_MESSAGE_DE", newValue)
|
||||
|
||||
Case "Active"
|
||||
UpdateSingleValue("CONTROL_ACTIVE", IIf(newValue = True, 1, 0))
|
||||
Dim oActive As Boolean = IIf(newValue = True, 1, 0)
|
||||
UpdateSingleValue("CONTROL_ACTIVE", oActive)
|
||||
|
||||
Case "DISPLAY_SEP_FORM"
|
||||
UpdateSingleValue("DISPLAY_IN_SEPERATE_FORM", IIf(newValue = True, 1, 0))
|
||||
@@ -977,7 +993,8 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
|
||||
Try
|
||||
If DatabaseFallback.ExecuteNonQueryECM($"UPDATE TBPM_PROFILE_CONTROLS SET {columnName} = {escapedValue}, CHANGED_WHO = '{USER_USERNAME}' WHERE GUID = {guid}") = True Then
|
||||
Dim oUPD = $"UPDATE TBPM_PROFILE_CONTROLS SET {columnName} = {escapedValue}, CHANGED_WHO = '{USER_USERNAME}' WHERE GUID = {guid}"
|
||||
If DatabaseFallback.ExecuteNonQueryECM(oUPD) = True Then
|
||||
tslblAenderungen.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
tslblAenderungen.Caption = "Änderungen gespeichert - " & Now
|
||||
If columnName.ToUpper = "CTRL_TEXT" Then
|
||||
@@ -986,6 +1003,8 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
CHANGES_FORM_DESIGN = True
|
||||
Return True
|
||||
Else
|
||||
_Logger.Info($"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}): ExecuteNonQueryECM [{oUPD}] returned False")
|
||||
End If
|
||||
|
||||
Return False
|
||||
@@ -1155,16 +1174,22 @@ Public Class frmFormDesigner
|
||||
Dim label = ControlCreator.CreateNewLabel(cursorPosition)
|
||||
SetMovementHandlers(label)
|
||||
|
||||
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, label.Name, "LBL", label.Text, label.Location.X, label.Location.Y, USER_USERNAME, label.Size.Height, label.Size.Width, label.TextAlign, "")
|
||||
CHANGES_FORM_DESIGN = True
|
||||
CurrentControl = label
|
||||
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
|
||||
.Guid = GetLastID(),
|
||||
.ReadOnly = False
|
||||
}
|
||||
|
||||
pnldesigner.Controls.Add(label)
|
||||
|
||||
Dim oInsert = $"INSERT INTO TBPM_PROFILE_CONTROLS
|
||||
(PROFIL_ID, NAME, CTRL_TYPE, CTRL_TEXT, X_LOC, Y_LOC, ADDED_WHO, HEIGHT, WIDTH, TEXT_ALIGNMENT, DISPLAY_IN_SEPERATE_FORM)
|
||||
VALUES ({ProfileId},'{label.Name}','LBL','{label.Text}','{label.Location.X}','{label.Location.Y}','{USER_USERNAME}',{label.Size.Height},{label.Size.Width},'{label.TextAlign}','')"
|
||||
If DatabaseFallback.ExecuteNonQueryECM(oInsert) Then
|
||||
'TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, label.Name, "LBL", label.Text, label.Location.X, label.Location.Y, USER_USERNAME, label.Size.Height, label.Size.Width, label.TextAlign, "")
|
||||
CHANGES_FORM_DESIGN = True
|
||||
CurrentControl = label
|
||||
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
|
||||
.Guid = GetLastID(),
|
||||
.ReadOnly = False
|
||||
}
|
||||
pnldesigner.Controls.Add(label)
|
||||
Else
|
||||
_Logger.Info($"Error while inserting new Label Control into TBPM_PROFILE_CONTROLS: {oInsert}")
|
||||
MsgBox("Fehler beim Erstellen des Labels. Bitte überprüfen Sie die Log-Datei für weitere Informationen.", MsgBoxStyle.Critical, "Fehler beim Erstellen des Labels")
|
||||
End If
|
||||
Case ClassControlCreator.PREFIX_TEXTBOX
|
||||
Dim txt = ControlCreator.CreateNewTextBox(cursorPosition)
|
||||
SetMovementHandlers(txt)
|
||||
@@ -1296,9 +1321,9 @@ Public Class frmFormDesigner
|
||||
RibPGCtrlWidth.Enabled = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Info($"Error while Adding new control {NewControlSelected}:")
|
||||
_Logger.Info(ex)
|
||||
MsgBox($"Error while Adding new control {NewControlSelected}: {ex.Message}" & vbCrLf & "Check the log for further info", MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Me.Cursor = Cursors.Default
|
||||
NewControlSelected = ""
|
||||
|
||||
@@ -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)
|
||||
@@ -3204,7 +3211,7 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
|
||||
})
|
||||
EnsureProfileSearchType(BASEDATA_DT_PROFILES_SEARCHES_DATA, "SQL", NameOf(BASEDATA_DT_PROFILES_SEARCHES_DATA))
|
||||
|
||||
oSQL = String.Format("SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{0}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, '{0}' as LANGUAGE, * FROM TBPM_PROFILE_CONTROLS WITH (NOLOCK)", {USER_LANGUAGE})
|
||||
oSQL = String.Format("SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{0}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, '{0}' as LANGUAGE, * FROM TBPM_PROFILE_CONTROLS WITH (NOLOCK) WHERE CONTROL_ACTIVE = 1", {USER_LANGUAGE})
|
||||
BASEDATA_TBPM_PROFILE_CONTROLS = DatabaseFallback.GetDatatable("TBPM_PROFILE_CONTROLS_LANGUAGE", New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
|
||||
.FilterExpression = String.Format("LANGUAGE = '{0}'", {USER_LANGUAGE})
|
||||
})
|
||||
|
||||
@@ -1164,7 +1164,6 @@ Public Class frmMassValidator
|
||||
If CreateWMObject() = True Then
|
||||
If ClassFinalizeDoc.Write_Final_Metadata(CURRENT_WMFILE) = True Then
|
||||
Dim sql = $"EXEC PRTF_PROFILE_FILES_WORK {CURRENT_DOC_ID},{CURRENT_ProfilGUID},{USER_ID},'Worked'"
|
||||
|
||||
'String.Format("UPDATE TBPM_PROFILE_FILES SET IN_WORK = 0, WORK_USER = '{0}', EDIT = 1 WHERE GUID = {1}", USER_USERNAME, CURRENT_DOC_GUID)
|
||||
If DatabaseFallback.ExecuteNonQueryECM(sql) = True Then
|
||||
workedFiles += 1
|
||||
|
||||
@@ -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)
|
||||
@@ -1380,9 +1382,8 @@ Public Class frmValidator
|
||||
Next
|
||||
End If
|
||||
' ========== ENDE ==========
|
||||
|
||||
oSQL = $"SELECT IIF(LANG.CAPTION IS NULL,T.SPALTEN_HEADER,LANG.CAPTION) SPALTEN_HEADER_LANG, T.* from TBPM_CONTROL_TABLE T WITH (NOLOCK) INNER JOIN TBPM_PROFILE_CONTROLS T1 WITH (NOLOCK) ON T.CONTROL_ID = T1.GUID
|
||||
LEFT JOIN (SELECT * FROM TBPM_CONTOL_TABLE_LANG WHERE LANG_CODE = '{USER_LANGUAGE}') LANG ON T.GUID = LANG.COL_ID WHERE T1.CONTROL_ACTIVE = 1 AND T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY T.SEQUENCE"
|
||||
LEFT JOIN (SELECT * FROM TBPM_CONTOL_TABLE_LANG WHERE LANG_CODE = '{USER_LANGUAGE}') LANG ON T.GUID = LANG.COL_ID WHERE T1.CONTROL_ACTIVE = 1 AND T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY T.SEQUENCE"
|
||||
DT_COLUMNS_GRID = DatabaseFallback.GetDatatable("TBPM_CONTROL_TABLE", New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
|
||||
.FilterExpression = $"PROFIL_ID = {CURRENT_ProfilGUID} AND LANG_CODE = '{USER_LANGUAGE}' ",
|
||||
.SortByColumn = "SEQUENCE"
|
||||
@@ -1792,6 +1793,7 @@ Public Class frmValidator
|
||||
Case Type = GetType(Windows.Forms.ComboBox)
|
||||
Dim cmb As Windows.Forms.ComboBox = inctrl
|
||||
cmb.SelectedIndex = -1
|
||||
cmb.Text = String.Empty
|
||||
Case Type = GetType(DataGridView)
|
||||
Dim dgv As DataGridView = inctrl
|
||||
If dgv.Rows.Count > 0 Then
|
||||
@@ -3780,9 +3782,9 @@ Public Class frmValidator
|
||||
' Fallback zu SQL
|
||||
Dim query As String
|
||||
If String.IsNullOrWhiteSpace(filter) Then
|
||||
query = "SELECT * FROM TBPM_PROFILE_CONTROLS"
|
||||
query = "SELECT * FROM TBPM_PROFILE_CONTROLS WHERE CONTROL_ACTIVE = 1"
|
||||
Else
|
||||
query = $"SELECT * FROM TBPM_PROFILE_CONTROLS WHERE {filter}"
|
||||
query = $"SELECT * FROM TBPM_PROFILE_CONTROLS WHERE CONTROL_ACTIVE = 1 AND {filter}"
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(SortBy) Then
|
||||
@@ -4241,7 +4243,7 @@ Public Class frmValidator
|
||||
End If
|
||||
|
||||
If Amount_Docs2Validate > 1 Then
|
||||
Dim omsg = String.Format(Translation_Strings.Verbleibende_Vorgänge___0_, Amount_Docs2Validate)
|
||||
Dim omsg = String.Format(Translation_Strings.Verbleibende_Vorgänge___0_, Amount_Docs2Validate - 1)
|
||||
bsiInformation.Caption = omsg
|
||||
bsiInformation.Caption = omsg
|
||||
If RbnPgGrpActions.Visible = False Then
|
||||
@@ -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")
|
||||
@@ -6994,7 +6996,7 @@ Public Class frmValidator
|
||||
Next
|
||||
Return odt
|
||||
End Function
|
||||
Function Check_UpdateIndexe() As Boolean
|
||||
Function Check_UpdateIndexe(Optional ByVal pRegularComplete As Boolean = True) As Boolean
|
||||
Dim oControlName
|
||||
Dim oControlId As String
|
||||
Try
|
||||
@@ -7085,12 +7087,17 @@ Public Class frmValidator
|
||||
Try
|
||||
Dim lookup As LookupControl3 = oControl
|
||||
If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Kein Auswahl getroffen in LookupGrid '{oControl.Name}'"
|
||||
MyValidationLogger.Warn($"⚠️ Kein Auswahl getroffen in LookupGrid '{oControl.Name}'")
|
||||
oControl.BackColor = Color.Red
|
||||
frmError.ShowDialog()
|
||||
Exit For
|
||||
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,13 +7149,20 @@ Public Class frmValidator
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
' Single-Select Lookup
|
||||
oMyInput = lookup.Properties.SelectedValues.FirstOrDefault()
|
||||
If IsNothing(oMyInput) And oIsRequired = True Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Could not get FirstOrDefault-Value of LookUpGrid! - LookUPGridName: {lookup.Name}"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
Exit For
|
||||
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,12 +7294,17 @@ Public Class frmValidator
|
||||
End If
|
||||
|
||||
If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
oControl.BackColor = Color.Red
|
||||
frmError.ShowDialog()
|
||||
Exit For
|
||||
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,15 +7429,20 @@ Public Class frmValidator
|
||||
MyValidationLogger.Debug($"Working on Combobox...")
|
||||
Dim cmb As Windows.Forms.ComboBox = oControl
|
||||
If cmb.SelectedIndex = -1 And oIsRequired = True 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 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,15 +7569,20 @@ Public Class frmValidator
|
||||
Try
|
||||
Dim dtp As DateTimePicker = oControl
|
||||
If oIsRequired = True And dtp.Value.ToString = String.Empty 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 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,15 +7670,20 @@ Public Class frmValidator
|
||||
oMyInput = chk.Checked.ToString
|
||||
|
||||
If chk.CheckState = CheckState.Indeterminate And oIsRequired = True 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 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,15 +7793,20 @@ Public Class frmValidator
|
||||
End If
|
||||
Next
|
||||
If oIsRequired = True And Zeilen = 0 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 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()
|
||||
@@ -8701,7 +8740,7 @@ Public Class frmValidator
|
||||
ShowOverlaySafe() ' ✅ Overlay hier öffnen
|
||||
Try
|
||||
' ========== FIX 2: Nur EINEN Check-Aufruf ==========
|
||||
If Check_UpdateIndexe() = True Then
|
||||
If Check_UpdateIndexe(False) = True Then
|
||||
SetStatusLabel("Data saved", "LimeGreen")
|
||||
MyValidationLogger.Info("Workflowdata saved manually!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user