From 2cc8da110dd437dec5c29f1dd5cff339f733a3d8 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 23 Dec 2021 15:07:15 +0100 Subject: [PATCH] Fix lettura dati da DB x licenza --- MP.AppAuth/Controllers/MPController .cs | 11 ++++++++++- MP.Land/Data/AppAuthService.cs | 2 ++ MP.Land/MP.Land.csproj | 2 +- MP.Land/Pages/SysInfo.razor | 15 ++++++++++----- MP.Land/Resources/ChangeLog.html | 2 +- MP.Land/Resources/VersNum.txt | 2 +- MP.Land/Resources/manifest.xml | 2 +- 7 files changed, 26 insertions(+), 10 deletions(-) diff --git a/MP.AppAuth/Controllers/MPController .cs b/MP.AppAuth/Controllers/MPController .cs index 0c54dd80..81c577ca 100644 --- a/MP.AppAuth/Controllers/MPController .cs +++ b/MP.AppAuth/Controllers/MPController .cs @@ -2,18 +2,20 @@ using NLog; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MP.AppAuth.Controllers { - public class MPController + public class MPController : IDisposable { #region Private Fields private static IConfiguration _configuration; private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + public static AppAuth.Controllers.MPController dbController; #endregion Private Fields @@ -29,6 +31,12 @@ namespace MP.AppAuth.Controllers #region Public Methods + public void Dispose() + { + // Clear database controller + dbController.Dispose(); + } + /// /// Elenco Record x AnagKeyValue @@ -46,6 +54,7 @@ namespace MP.AppAuth.Controllers return dbResult; } + #endregion Public Methods } } \ No newline at end of file diff --git a/MP.Land/Data/AppAuthService.cs b/MP.Land/Data/AppAuthService.cs index 67037c3d..6f586b39 100644 --- a/MP.Land/Data/AppAuthService.cs +++ b/MP.Land/Data/AppAuthService.cs @@ -69,6 +69,7 @@ namespace MP.Land.Data else { dbController = new AppAuth.Controllers.AppAuthController(configuration); + MpDbController = new AppAuth.Controllers.MPController(configuration); _logger.LogInformation("DbController OK"); } } @@ -144,6 +145,7 @@ namespace MP.Land.Data { // Clear database controller dbController.Dispose(); + MpDbController.Dispose(); } public string Traduci(string lemma, string lingua = "IT") diff --git a/MP.Land/MP.Land.csproj b/MP.Land/MP.Land.csproj index 5340ca47..9672a391 100644 --- a/MP.Land/MP.Land.csproj +++ b/MP.Land/MP.Land.csproj @@ -3,7 +3,7 @@ net5.0 MP.Land - 6.14.2112.2314 + 6.14.2112.2315 diff --git a/MP.Land/Pages/SysInfo.razor b/MP.Land/Pages/SysInfo.razor index 7de838bd..d5cfbb5c 100644 --- a/MP.Land/Pages/SysInfo.razor +++ b/MP.Land/Pages/SysInfo.razor @@ -128,7 +128,7 @@ @@ -140,18 +140,23 @@ protected string Messaggio = "HW & SW details"; protected HwSwInfo currHwSwInfo = HwSwInfo.man(System.Reflection.Assembly.GetExecutingAssembly()); - protected async Task masterLic() + protected string masterLic = ""; + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + protected async Task ReloadData() { - string answ = "-"; var akvList = await DataService.AnagKeyValList(); var licRecord = akvList .Where(x => x.NomeVar == "MAPO") .FirstOrDefault(); if (licRecord != null) { - answ = licRecord.ValString; + masterLic = licRecord.ValString; } - return answ; } protected string DbNameExample diff --git a/MP.Land/Resources/ChangeLog.html b/MP.Land/Resources/ChangeLog.html index 8e776013..3fcbcdb1 100644 --- a/MP.Land/Resources/ChangeLog.html +++ b/MP.Land/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo gestione Programmi MAPO -

Versione: 6.14.2112.2314

+

Versione: 6.14.2112.2315


Note di rilascio:
    diff --git a/MP.Land/Resources/VersNum.txt b/MP.Land/Resources/VersNum.txt index 2fb5c419..aae3317e 100644 --- a/MP.Land/Resources/VersNum.txt +++ b/MP.Land/Resources/VersNum.txt @@ -1 +1 @@ -6.14.2112.2314 +6.14.2112.2315 diff --git a/MP.Land/Resources/manifest.xml b/MP.Land/Resources/manifest.xml index 8d1fc59d..26b3c9a1 100644 --- a/MP.Land/Resources/manifest.xml +++ b/MP.Land/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.14.2112.2314 + 6.14.2112.2315 https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html false