Hervorgehobene Fehlermeldung beim Indexieren - frmIndex

This commit is contained in:
OlgunR
2025-04-30 13:06:06 +02:00
parent 274b1db57b
commit d11a0453bb
3 changed files with 52 additions and 11 deletions

View File

@@ -350,8 +350,12 @@ Public Class frmIndex
'#Region "+++++ Funktionen bei OK - schliessen ++++++"
Function CheckWrite_IndexeMan(oDocumentTypeId As Integer)
'#### Zuerst manuelle Werte indexieren ####
Try
_Logger.Info("In CheckWrite_IndexeMan")
DxErrorProvider1.ClearErrors()
Dim oResult As Boolean = False
For Each oControl As Control In Me.pnlIndex.Controls
' MsgBox(ctrl.Name)
@@ -362,14 +366,17 @@ Public Class frmIndex
If optional_index = False Then
If USER_LANGUAGE = LANG_DE Then
MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, "Fehlende Eingabe:")
'MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, "Fehlende Eingabe:")
DxErrorProvider1.SetError(box, TEXT_MISSING_INPUT_DE)
Else
MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, "Missing Input:")
'MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, "Missing Input:")
DxErrorProvider1.SetError(box, TEXT_MISSING_INPUT_EN)
End If
box.Focus()
Return False
Else
DxErrorProvider1.SetError(box, "")
Indexwert_Postprocessing(Replace(box.Name, "txt", ""), "")
oResult = True
End If
@@ -386,10 +393,11 @@ Public Class frmIndex
End If
_Logger.Info(oMessage)
MsgBox(oMessage, MsgBoxStyle.Exclamation, oTitle)
DxErrorProvider1.SetError(box, oMessage)
box.Focus()
Return False
Else
DxErrorProvider1.SetError(box, "")
Indexwert_Postprocessing(Replace(box.Name, "txt", ""), box.Text)
oResult = True
End If
@@ -405,18 +413,22 @@ Public Class frmIndex
If oIsOptionalIndex = False Then
If USER_LANGUAGE = LANG_DE Then
MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(oLookup, TEXT_MISSING_INPUT_DE)
Else
MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(oLookup, TEXT_MISSING_INPUT_EN)
End If
oLookup.Focus()
Return False
Else
DxErrorProvider1.SetError(oLookup, "")
Indexwert_Postprocessing(Replace(oLookup.Name, "cmbMulti", ""), "")
oResult = True
End If
Else
DxErrorProvider1.SetError(oLookup, "")
Dim vectorValue = String.Join(ClassConstants.VECTORSEPARATOR, oValues)
Indexwert_Postprocessing(Replace(oLookup.Name, "cmbMulti", ""), vectorValue)
oResult = True
@@ -429,13 +441,16 @@ Public Class frmIndex
If optional_index = False Then
If USER_LANGUAGE = LANG_DE Then
MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(cmbSingle, TEXT_MISSING_INPUT_DE)
Else
MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(cmbSingle, TEXT_MISSING_INPUT_EN)
End If
cmbSingle.Focus()
Return False
Else
DxErrorProvider1.SetError(cmbSingle, "")
Indexwert_Postprocessing(Replace(cmbSingle.Name, "cmbSingle", ""), "")
oResult = True
End If
@@ -449,17 +464,21 @@ Public Class frmIndex
Dim optional_index As Boolean = DATABASE_ECM.GetScalarValue("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & oDocumentTypeId & " AND NAME = '" & Replace(cmb.Name, "cmb", "") & "'")
If optional_index = False Then
If USER_LANGUAGE = LANG_DE Then
MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(cmb, TEXT_MISSING_INPUT_DE)
Else
MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(cmb, TEXT_MISSING_INPUT_EN)
End If
cmb.Focus()
Return False
Else
DxErrorProvider1.SetError(cmb, "")
Indexwert_Postprocessing(Replace(cmb.Name, "cmb", ""), "")
oResult = True
End If
Else
DxErrorProvider1.SetError(cmb, "")
Indexwert_Postprocessing(Replace(cmb.Name, "cmb", ""), cmb.Text)
oResult = True
End If
@@ -473,23 +492,28 @@ Public Class frmIndex
If optional_index = False Then
If USER_LANGUAGE = LANG_DE Then
MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_DE, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(dtp, TEXT_MISSING_INPUT_DE)
Else
MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
'MsgBox(TEXT_MISSING_INPUT_EN, MsgBoxStyle.Exclamation, Text)
DxErrorProvider1.SetError(dtp, TEXT_MISSING_INPUT_EN)
End If
dtp.Focus()
Return False
Else
DxErrorProvider1.SetError(dtp, "")
Indexwert_Postprocessing(oIndexName, "")
oResult = True
End If
Else
DxErrorProvider1.SetError(dtp, "")
Indexwert_Postprocessing(Replace(dtp.Name, "dtp", ""), dtp.Text)
oResult = True
End If
End If
If oControl.Name.StartsWith("chk") Then
Dim chk As CheckEdit = oControl
DxErrorProvider1.SetError(chk, "")
Indexwert_Postprocessing(Replace(chk.Name, "chk", ""), chk.Checked)
oResult = True
End If