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

@ -67,6 +67,7 @@ Partial Class frmIndex
Me.PdfBarController1 = New DevExpress.XtraPdfViewer.Bars.PdfBarController(Me.components) Me.PdfBarController1 = New DevExpress.XtraPdfViewer.Bars.PdfBarController(Me.components)
Me.PdfBarController2 = New DevExpress.XtraPdfViewer.Bars.PdfBarController(Me.components) Me.PdfBarController2 = New DevExpress.XtraPdfViewer.Bars.PdfBarController(Me.components)
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.DxErrorProvider1 = New DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(Me.components)
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer1.Panel1.SuspendLayout() Me.SplitContainer1.Panel1.SuspendLayout()
Me.SplitContainer1.Panel2.SuspendLayout() Me.SplitContainer1.Panel2.SuspendLayout()
@ -81,6 +82,7 @@ Partial Class frmIndex
CType(Me.VWINDEX_AUTOMBindingSource1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.VWINDEX_AUTOMBindingSource1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PdfBarController1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PdfBarController1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PdfBarController2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PdfBarController2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.DxErrorProvider1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'SplitContainer1 'SplitContainer1
@ -366,6 +368,10 @@ Partial Class frmIndex
Me.RibbonPage2.Name = "RibbonPage2" Me.RibbonPage2.Name = "RibbonPage2"
resources.ApplyResources(Me.RibbonPage2, "RibbonPage2") resources.ApplyResources(Me.RibbonPage2, "RibbonPage2")
' '
'DxErrorProvider1
'
Me.DxErrorProvider1.ContainerControl = Me
'
'frmIndex 'frmIndex
' '
Me.Appearance.Options.UseFont = True Me.Appearance.Options.UseFont = True
@ -392,6 +398,7 @@ Partial Class frmIndex
CType(Me.VWINDEX_AUTOMBindingSource1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.VWINDEX_AUTOMBindingSource1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PdfBarController1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PdfBarController1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PdfBarController2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PdfBarController2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.DxErrorProvider1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@ -441,4 +448,5 @@ Partial Class frmIndex
Friend WithEvents SearchLookUpEdit1View As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents SearchLookUpEdit1View As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents DxErrorProvider1 As DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider
End Class End Class

View File

@ -709,6 +709,9 @@
<data name="RibbonPage2.Text" xml:space="preserve"> <data name="RibbonPage2.Text" xml:space="preserve">
<value>RibbonPage2</value> <value>RibbonPage2</value>
</data> </data>
<metadata name="DxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>313, 54</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@ -904,6 +907,12 @@
<data name="&gt;&gt;RibbonPage2.Type" xml:space="preserve"> <data name="&gt;&gt;RibbonPage2.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPage, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.Ribbon.RibbonPage, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;DxErrorProvider1.Name" xml:space="preserve">
<value>DxErrorProvider1</value>
</data>
<data name="&gt;&gt;DxErrorProvider1.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>frmIndex</value> <value>frmIndex</value>
</data> </data>

View File

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