COmplreto refresh gestione licenze LAND

- sistemato GC in generale
- controllo e sistemazione calcolo data scadenza
This commit is contained in:
Samuele Locatelli
2022-11-04 16:09:26 +01:00
parent b8dc7dffc4
commit 8fbfea1f62
10 changed files with 40 additions and 15 deletions
+29 -1
View File
@@ -372,7 +372,35 @@ namespace MP.Land.Data
}
else
{
_logger.LogInformation($"Record non trovato per {authKey}");
_logger.LogInformation($"checkLicenseActive | Record non trovato per {authKey}");
}
}
return answ;
}
/// <summary>
/// Verifica scadenza licenza
/// </summary>
/// <param name="authKey"></param>
/// <returns></returns>
public DateTime getLicenseExpiry(string authKey)
{
DateTime answ = DateTime.Today.AddDays(-1);
//cerco anche nelle info AKV
if (AKVList != null)
{
var recLic = AKVList.Where(x => x.ValString == authKey).FirstOrDefault();
int numLic = 0;
//cerco in record
if (recLic != null)
{
numLic = (int)recLic.ValInt;
// verifico scadenza licenza!
DateTime scadenza = licenseManGLS.expiryDateByAuthKey(Installazione, recLic.NomeVar, numLic, authKey);
answ = scadenza;
}
else
{
_logger.LogInformation($"getLicenseExpiry | Record non trovato per {authKey}");
}
}
return answ;
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Land</RootNamespace>
<Version>6.16.2211.0415</Version>
<Version>6.16.2211.0416</Version>
</PropertyGroup>
<ItemGroup>
+3 -6
View File
@@ -4,12 +4,8 @@ using System.Threading.Tasks;
namespace MP.Land.Pages
{
public partial class About
public partial class About
{
#region Public Methods
#endregion Public Methods
#region Protected Methods
protected override async Task OnInitializedAsync()
@@ -43,7 +39,7 @@ namespace MP.Land.Pages
private async Task reloadLicenseData()
{
int cDelay = 5;
int cDelay = 10;
// recupero dati
await Task.Delay(cDelay);
try
@@ -54,6 +50,7 @@ namespace MP.Land.Pages
Installazione = LicServ.Installazione;
Applicazione = LicServ.Applicazione;
MastKey = LicServ.MasterKey;
Scadenza = LicServ.getLicenseExpiry(LicServ.MasterKey);
await Task.Delay(cDelay);
var fatto = await LicServ.RefreshLicense();
await Task.Delay(cDelay);
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 6.16.2211.0415</h4>
<h4>Versione: 6.16.2211.0416</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.16.2211.0415
6.16.2211.0416
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2211.0415</version>
<version>6.16.2211.0416</version>
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2211.414</Version>
<Version>6.16.2211.415</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2211.414</h4>
<h4>Versione: 6.16.2211.415</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2211.414
6.16.2211.415
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2211.414</version>
<version>6.16.2211.415</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>