From e326a7b660cb4e7ae8d16c787d1b9602579f066b Mon Sep 17 00:00:00 2001 From: Digital Data - Marlon Schreiber Date: Fri, 18 Dec 2020 09:05:51 +0100 Subject: [PATCH] Save_InButtonOverride MainHandling --- app/DD_PM_WINDREAM/ClassInit.vb | 6 +++--- app/DD_PM_WINDREAM/frmMain.vb | 22 ++++++++++++++++------ app/DD_PM_WINDREAM/frmValidator.vb | 19 ++++++++++++------- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/app/DD_PM_WINDREAM/ClassInit.vb b/app/DD_PM_WINDREAM/ClassInit.vb index 74dad69..c5ee76b 100644 --- a/app/DD_PM_WINDREAM/ClassInit.vb +++ b/app/DD_PM_WINDREAM/ClassInit.vb @@ -86,11 +86,11 @@ Public Class ClassInit CONNECTION_STRING_READ = CONNECTION_STRING End If - If CONFIG.Config.AppServerConfig <> String.Empty Then + If CONFIG.Config.EDMIAppServer <> String.Empty Then Try - Dim oSplit() = CONFIG.Config.AppServerConfig.ToString.Split(";") + Dim oSplit() = CONFIG.Config.EDMIAppServer.ToString.Split(";") Dim oAppServer = oSplit(0) Dim oAppServerPort = 9000 If oSplit.Length = 2 Then @@ -99,7 +99,7 @@ Public Class ClassInit _Client = New Client(LOGCONFIG, oAppServer, oAppServerPort) If Not IsNothing(_Client) Then If _Client.Connect() Then - APPSERVER_ACTIVE = True + EDMIAppServerActive = True End If End If diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index 857f829..7df8651 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -34,7 +34,7 @@ Public Class frmMain Private NO_WORKFLOWITEMS As Boolean = False Private InResetlayout As Boolean = False Private RefreshHelper As RefreshHelper - + Private _FormValidator As frmValidator Private FormOpenClose As Boolean = False Private FormShown As Boolean = False Private GridIsLoaded As Boolean = False @@ -166,9 +166,10 @@ Public Class frmMain End Try Try - bsiLicenses.Caption = "Anzahl Lizenzen: " & LICENSE_COUNT - LOGGER.Debug("Initializing MainForm....") - If ERROR_STATE = "NO USER" Then + bsiLicenses.Caption = "Anzahl Lizenzen: " & LICENSE_COUNT + LOGGER.Debug("Initializing MainForm....") + + If ERROR_STATE = "NO USER" Then Dim oDT As DataTable = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("No Userconfig") MsgBox(oDT.Rows(0).Item("STRING1") & vbNewLine & oDT.Rows(0).Item("STRING2"), MsgBoxStyle.Critical, "Exception") Me.Close() @@ -1201,7 +1202,9 @@ Public Class frmMain BASEDATA_DT_PROFILES_SEARCHES_SQL.Select(oExpression, "TAB_INDEX").CopyToDataTable(BASEDATA_DT_PROFILE_SEARCHES_SQL, LoadOption.PreserveChanges) Try - frmValidator.Show() + _FormValidator = New frmValidator + AddHandler _FormValidator.FormClosed, AddressOf ValidatorClosed + _FormValidator.Show() Catch ex As Exception LOGGER.Warn($"Error opening Form frmValidator [{ex.Message}]") LOGGER.Warn($"ex.InnerException.Message [{ex.InnerException.Message}]") @@ -1311,7 +1314,6 @@ Public Class frmMain OItemScopeInfo = $"groupRowText {groupRowText}" LOGGER.Debug($"Item_Scope: groupRowText {groupRowText}") oHitProfilID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hitInfo.RowHandle), GridView_Docs.Columns("PROFILE_ID")) - ElseIf hitInfo.InDataRow Then GridViewItem_Clicked = "ROW" OItemScopeInfo = "InDataRow" @@ -1439,6 +1441,14 @@ Public Class frmMain End Try End Sub + Private Async Sub ValidatorClosed(sender As Object, e As FormClosedEventArgs) + Try + Await Decide_Load(False, True) + If GridControl_Docs.Visible = True And FormOpenClose = False Then RefreshHelper.LoadViewInfo() + Catch ex As Exception + LOGGER.Error(ex) + End Try + End Sub Private Function Init_IDB() Try IDBData = New ClassIDBData() diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index bc4fe21..835609b 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -1402,9 +1402,14 @@ Public Class frmValidator End If Case "Override_Direct".ToUpper Override = True - Finish_WFStep(False) + If Check_UpdateIndexe() = False Then + Finish_WFStep(False) + End If + Case "Override incFinal".ToUpper - Finish_WFStep(False) + If Check_UpdateIndexe() = False Then + Finish_WFStep(False) + End If Case Else MsgBox($"No configured action provided for onCustomButtonClick [{oAction}]", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) LOGGER.Warn($"No configured action provided for onCustomButtonClick [{oAction}]") @@ -2665,11 +2670,11 @@ Public Class frmValidator End If LOGGER.Info(oMsg) Dim oROW As DataRow = ClassAllgemeineFunktionen.GUI_LANGUAGE_MSGBOX("frmValidator.NoMoreDocument") - Try - MsgBox(oROW.Item("STRING1"), MsgBoxStyle.Information, oROW.Item("STRING2")) - Catch ex As Exception - MsgBox("No more documents! (No translation so far)" & vbNewLine & "Form will be closed now!", MsgBoxStyle.Information, ADDITIONAL_TITLE) - End Try + 'Try + ' MsgBox(oROW.Item("STRING1"), MsgBoxStyle.Information, oROW.Item("STRING2")) + 'Catch ex As Exception + ' MsgBox("No more documents! (No translation so far)" & vbNewLine & "Form will be closed now!", MsgBoxStyle.Information, ADDITIONAL_TITLE) + 'End Try activate_controls(True) Me.Close() End If