From 5b1d07d98b451c86112ebc3564e5b4020891e330 Mon Sep 17 00:00:00 2001 From: SchreiberM Date: Wed, 18 Oct 2023 13:05:19 +0200 Subject: [PATCH 1/2] 2.4.6.4 MS DateParse in LicenseDate --- app/TaskFlow/ClassInit.vb | 17 ++++++++++++++++- app/TaskFlow/My Project/AssemblyInfo.vb | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/TaskFlow/ClassInit.vb b/app/TaskFlow/ClassInit.vb index cb24f80..9108752 100644 --- a/app/TaskFlow/ClassInit.vb +++ b/app/TaskFlow/ClassInit.vb @@ -5,6 +5,7 @@ Imports DigitalData.Modules.EDMI.API Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback Imports DigitalData.Modules.EDMI.API.Constants Imports DigitalData.Modules.Database +Imports System.Windows.Forms.VisualStyles.VisualStyleElement Public Class ClassInit Public _lizenzManager As ClassLicenseManager @@ -239,7 +240,21 @@ Public Class ClassInit If split.Length >= 2 Then LICENSE_VALID = True End If - Dim oLICDATE = CDate(split(1)) + Dim oLICDATE As Date + Try + oLICDATE = CDate(split(1)) + Catch ex As Exception + LOGGER.Warn($"Error Converting Value {split(1)} to DATE") + Try + Dim expenddt As Date = Date.ParseExact(split(1), "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo) + oLICDATE = expenddt + Catch ex1 As Exception + LOGGER.Warn($"Second Error Converting DATE with ParseExact - Setting Date = Today") + oLICDATE = Now.Date + End Try + + End Try + If oLICDATE < CDate(Now) Then MsgBox("Your license has expired!" & vbNewLine & "Last valid date: " & split(1) & vbNewLine & "Please contact Your sysadmin", MsgBoxStyle.Exclamation) LICENSE_EXPIRED = True diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index 5d758e6..3b392cd 100644 --- a/app/TaskFlow/My Project/AssemblyInfo.vb +++ b/app/TaskFlow/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + From f11b1185606e95f3c557bda836df4bc41c832525 Mon Sep 17 00:00:00 2001 From: SchreiberM Date: Thu, 19 Oct 2023 11:13:44 +0200 Subject: [PATCH 2/2] Parameter EXCEL_EXPORT_OVERVIEW --- app/TaskFlow/ClassParamRefresh.vb | 5 ++++- app/TaskFlow/ModuleRuntimeVariables.vb | 1 + app/TaskFlow/clsPatterns.vb | 2 +- app/TaskFlow/frmMain.vb | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/TaskFlow/ClassParamRefresh.vb b/app/TaskFlow/ClassParamRefresh.vb index 3fbee8c..c90bb05 100644 --- a/app/TaskFlow/ClassParamRefresh.vb +++ b/app/TaskFlow/ClassParamRefresh.vb @@ -108,9 +108,12 @@ Public Class ClassParamRefresh ' If ClassDatabase.Init(CONNECTION_STRING_IDB_APP_SERVER) = True Then ' LOGGER.Info($"Got an IDB APP-Server-Connection [{CON_ID}]!") ' End If + ElseIf oMode = "PM.EXCEL_OVERVIEW" Then + EXCEL_OVERVIEW = True + LOGGER.Debug($"EXCEL_OVERVIEW [{EXCEL_OVERVIEW}]") ElseIf oMode = "PM.MONITORING" Then MONITORING_ACTIVE = True - LOGGER.Debug($"SHOW_MASS_VALIDATOR [{SHOW_MASS_VALIDATOR}]") + LOGGER.Debug($"MONITORING_ACTIVE [{MONITORING_ACTIVE}]") ElseIf oMode = "PM.GHOSTMODE" Then GHOSTMODE_ACTIVE = True LOGGER.Debug($"GHOSTMODE_ACTIVE [{GHOSTMODE_ACTIVE}]") diff --git a/app/TaskFlow/ModuleRuntimeVariables.vb b/app/TaskFlow/ModuleRuntimeVariables.vb index b1f22ab..5957dd3 100644 --- a/app/TaskFlow/ModuleRuntimeVariables.vb +++ b/app/TaskFlow/ModuleRuntimeVariables.vb @@ -79,6 +79,7 @@ Module ModuleRuntimeVariables Public Property SHOW_MASS_VALIDATOR As Boolean = True Public Property WORKING_MODE As String = "" Public Property MONITORING_ACTIVE As Boolean = False + Public Property EXCEL_OVERVIEW As Boolean = False Public Property GHOSTMODE_ACTIVE As Boolean = False Public Property RIBBON_COLOR_SCHEME As String = "" Public Property ADDITIONAL_TITLE As String = "" diff --git a/app/TaskFlow/clsPatterns.vb b/app/TaskFlow/clsPatterns.vb index 1047c15..865c248 100644 --- a/app/TaskFlow/clsPatterns.vb +++ b/app/TaskFlow/clsPatterns.vb @@ -49,7 +49,7 @@ Public Class clsPatterns Public Const INT_VALUE_DOMAIN = "DOMAIN" Public Const INT_VALUE_DATE = "DATE" - Public Const MAX_TRY_COUNT = 50 + Public Const MAX_TRY_COUNT = 20 ''' ''' This value will be valid as any datatype, diff --git a/app/TaskFlow/frmMain.vb b/app/TaskFlow/frmMain.vb index 9259c54..7322dad 100644 --- a/app/TaskFlow/frmMain.vb +++ b/app/TaskFlow/frmMain.vb @@ -463,7 +463,7 @@ Public Class frmMain Else RibbonPageGroupBasicConf.Visible = True End If - If USER_IS_ADMIN = True Then + If EXCEL_OVERVIEW = True Then BarButtonItemExportExcel.Visibility = DevExpress.XtraBars.BarItemVisibility.Always Else BarButtonItemExportExcel.Visibility = DevExpress.XtraBars.BarItemVisibility.Never @@ -3112,7 +3112,9 @@ where (CONVERT(DATE,GETDATE()) <= NOTE.DISPLAY_UNTIL or NOTE.DISPLAY_UNTIL IS NU If ribbon.SelectedPage Is RibbonPageAktionen Then Select Case GridViewItem_Clicked Case "GROUP" - BarButtonItemMassValidation.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + If SHOW_MASS_VALIDATOR = True Then + BarButtonItemMassValidation.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + End If Case "ROW" ' If selectedRows.Count > 1 Then ' CMFileStart.Enabled = False