diff --git a/Global_Indexer/frmIndex.designer.vb b/Global_Indexer/frmIndex.designer.vb index f7ee7bc..9ec2afb 100644 --- a/Global_Indexer/frmIndex.designer.vb +++ b/Global_Indexer/frmIndex.designer.vb @@ -67,6 +67,7 @@ Partial Class frmIndex Me.PdfBarController1 = New DevExpress.XtraPdfViewer.Bars.PdfBarController(Me.components) Me.PdfBarController2 = New DevExpress.XtraPdfViewer.Bars.PdfBarController(Me.components) Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.DxErrorProvider1 = New DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(Me.components) CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainer1.Panel1.SuspendLayout() Me.SplitContainer1.Panel2.SuspendLayout() @@ -81,6 +82,7 @@ Partial Class frmIndex CType(Me.VWINDEX_AUTOMBindingSource1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PdfBarController1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PdfBarController2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.DxErrorProvider1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'SplitContainer1 @@ -366,6 +368,10 @@ Partial Class frmIndex Me.RibbonPage2.Name = "RibbonPage2" resources.ApplyResources(Me.RibbonPage2, "RibbonPage2") ' + 'DxErrorProvider1 + ' + Me.DxErrorProvider1.ContainerControl = Me + ' 'frmIndex ' Me.Appearance.Options.UseFont = True @@ -392,6 +398,7 @@ Partial Class frmIndex CType(Me.VWINDEX_AUTOMBindingSource1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PdfBarController1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PdfBarController2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.DxErrorProvider1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -441,4 +448,5 @@ Partial Class frmIndex Friend WithEvents SearchLookUpEdit1View As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents DxErrorProvider1 As DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider End Class diff --git a/Global_Indexer/frmIndex.resx b/Global_Indexer/frmIndex.resx index 88ee183..ee86616 100644 --- a/Global_Indexer/frmIndex.resx +++ b/Global_Indexer/frmIndex.resx @@ -709,6 +709,9 @@ RibbonPage2 + + 313, 54 + True @@ -904,6 +907,12 @@ DevExpress.XtraBars.Ribbon.RibbonPage, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + DxErrorProvider1 + + + DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + frmIndex diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index 29b7fc0..e2f8b9f 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -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