From 4e01de4f6687a4ce6bf164ac730821d67308ab46 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 24 Mar 2021 14:29:16 +0100 Subject: [PATCH 1/4] only show major + minor parts of current version --- app/DD_PM_WINDREAM/frmMain.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index dd1a837..15b01ca 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -150,7 +150,11 @@ Public Class frmMain ' Create helper to save/load expanded GroupColumns at runtime RefreshHelper = New RefreshHelper(GridView_Docs, "GUID") - bsiVersion.Caption = String.Format("Version {0}", My.Application.Info.Version.ToString) + ' Nur noch die ersten Zwei Teile der Version anzeigen + Dim oVersion = My.Application.Info.Version + + bsiVersion.Caption = String.Format("Version {0}.{1}", oVersion.Major, oVersion.Minor) + If ERROR_STATE = "NO DB-CONNECTION" Or ERROR_STATE = "FAILED DBCONNECTION" Then MsgBox("Please add a database-Connection in AppConfig!", MsgBoxStyle.Critical, "Fehlende Konfiguration:") frmKonfig.ShowDialog() From 7a976ac08bfc09b3f58b44ef18e0cc7b271f126f Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 24 Mar 2021 14:29:47 +0100 Subject: [PATCH 2/4] improve validation, switch to inline error marker again --- app/DD_PM_WINDREAM/ClassControlCreator.vb | 10 ++-- app/DD_PM_WINDREAM/frmValidator.vb | 61 +++++++++++++---------- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/app/DD_PM_WINDREAM/ClassControlCreator.vb b/app/DD_PM_WINDREAM/ClassControlCreator.vb index bf55378..cacfa07 100644 --- a/app/DD_PM_WINDREAM/ClassControlCreator.vb +++ b/app/DD_PM_WINDREAM/ClassControlCreator.vb @@ -409,7 +409,7 @@ Public Class ClassControlCreator Public Shared Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean) As GridControl Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode) Dim oDatatable As New DataTable - Dim oView As DevExpress.XtraGrid.Views.Grid.GridView + Dim oView As GridView oControl.ForceInitialize() @@ -555,19 +555,23 @@ Public Class ClassControlCreator Where r.Item("SPALTENNAME") = oCol.ColumnName Select r).FirstOrDefault() + Dim oGridColumn As GridColumn = (From c As GridColumn In oView.Columns + Where c.FieldName = oCol.ColumnName + Select c).FirstOrDefault() + Dim oIsRequired = oColumn.Item("VALIDATION") Dim oValue = NotNull(oView.GetRowCellValue(e.RowHandle, oCol.ColumnName), "") If oIsRequired And oValue = "" Then + oView.SetColumnError(oGridColumn, "Spalte muss ausgefüllt werden!") e.Valid = False - e.ErrorText = $"Spalte {oColumn.Item("SPALTEN_HEADER")} muss ausgefüllt werden!" Exit For End If Next End Sub AddHandler oView.InvalidRowException, Sub(sender As Object, e As InvalidRowExceptionEventArgs) - e.ExceptionMode = ExceptionMode.DisplayError + e.ExceptionMode = ExceptionMode.NoAction End Sub AddHandler oView.ValidatingEditor, Sub(sender As Object, e As BaseContainerValidateEditorEventArgs) diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index c738158..ec1cd2b 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -3672,6 +3672,14 @@ Public Class frmValidator btnSave.Enabled = False ' TODO: Use when working on Validation + If ForceGridValidation() = True Then + Finish_WFStep() + End If + + btnSave.Enabled = True + End Sub + + Private Function ForceGridValidation() Dim oValidation As Boolean = True Dim oGrids = (From oControl In pnldesigner.Controls Where TypeOf oControl Is GridControl @@ -3684,26 +3692,19 @@ Public Class frmValidator Continue For End If - For index = 0 To oView.RowCount - 1 - oView.FocusedRowHandle = index - - If oView.UpdateCurrentRow() = False Then - oValidation = False - Exit For - End If - Next + If oView.UpdateCurrentRow() = False Then + oValidation = False + Return False + End If If oValidation = False Then - Exit For + Return False End If Next - If oValidation = True Then - Finish_WFStep() - End If + Return True + End Function - btnSave.Enabled = True - End Sub Private Function btnFinish_continue() Try Dim oSQL = PROFIL_FINISH_SQL @@ -5407,11 +5408,16 @@ Public Class frmValidator End Sub Private Sub bbtniNext_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniNext.ItemClick - Datei_ueberspringen() + If ForceGridValidation() = True Then + Datei_ueberspringen() + End If End Sub Private Sub bbtniDelete_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniDelete.ItemClick - delete_active_File() + If ForceGridValidation() = True Then + delete_active_File() + End If + End Sub Private Sub bbtniAnnotation_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniAnnotation.ItemClick @@ -5423,16 +5429,19 @@ Public Class frmValidator End Sub Private Sub BbtnItm_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BbtnItm.ItemClick - Dim oRESULT As String - If USER_LANGUAGE = "de-DE" Then - oRESULT = "Eingaben gespeichert" - Else - oRESULT = "Eingaben gespeichert" - End If - If Check_UpdateIndexe() = True Then - SetStatusLabel($"Data saved", "LimeGreen") - Else - SetStatusLabel($"Error while saving data!", "Red") + If ForceGridValidation() = True Then + Dim oRESULT As String + + If USER_LANGUAGE = "de-DE" Then + oRESULT = "Eingaben gespeichert" + Else + oRESULT = "Eingaben gespeichert" + End If + If Check_UpdateIndexe() = True Then + SetStatusLabel($"Data saved", "LimeGreen") + Else + SetStatusLabel($"Error while saving data!", "Red") + End If End If End Sub Private Sub SaveDevExpressGridControl_Layout(pProfilID As Integer, pControlID As Integer, pGridView As DevExpress.XtraGrid.Views.Grid.GridView) From 57e337d5f2aa508ec93f9acd93b9bfb775334c5f Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 24 Mar 2021 14:38:20 +0100 Subject: [PATCH 3/4] clean up --- app/DD_PM_WINDREAM/frmValidator.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index ec1cd2b..db8f427 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -5046,8 +5046,7 @@ Public Class frmValidator Catch ex As Exception LOGGER.Warn($"Unexpected error in Check_UpdateIndexe - ControlID: {oControlId},{oControlName}") LOGGER.Error(ex) - Dim st As New StackTrace(True) - st = New StackTrace(ex, True) + Dim st As New StackTrace(ex, True) MsgBox($"Unexpected error in Check_UpdateIndexe ControlID,Name: {oControlId},{oControlName}" & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:") LOGGER.Info("Unexpected error in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True) Return False From 2e9ce03de102ad377032a0de1a6ca6e54c4b4693 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 24 Mar 2021 14:38:50 +0100 Subject: [PATCH 4/4] Version 2.1.11.0 --- app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb index 7b06d96..7e5b021 100644 --- a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb +++ b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - +