Completato fix x download CTrack da elenco...

This commit is contained in:
Samuele Locatelli
2022-02-01 12:49:49 +01:00
parent 98d32300cf
commit cc21f4b719
4 changed files with 22 additions and 4 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
<div class="row text-center">
@using MP.Land.Data
@inject LicenseService LicServ
<div class="row text-center">
@if (authOk())
{
<div class="col-12 mt-2">
+5 -1
View File
@@ -42,7 +42,11 @@ namespace MP.Land.Components
protected bool authOk()
{
bool answ = !string.IsNullOrEmpty(CurrItem.LicenseKey) && CurrItem.IsAuth;
bool answ = !string.IsNullOrEmpty(CurrItem.LicenseKey);
if (answ)
{
answ = LicServ.checkLicenseActive(CurrItem.LicenseKey);
}
return answ;
}
+1
View File
@@ -2,6 +2,7 @@
@using MP.Land.Data
@using MP.Land.Components
@inject LicenseService LicServ
<div class="alert alert-secondary">
<div class="row">
+12 -2
View File
@@ -88,8 +88,18 @@ namespace MP.Land.Pages
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
// ciclo su tutti quelli con licenza valida...
var authList = ListRecords
.Where(x => !string.IsNullOrEmpty(x.LicenseKey) && x.IsAuth).ToList();
List<AppAuth.Models.UpdMan> rawList = ListRecords
.Where(x => !string.IsNullOrEmpty(x.LicenseKey)).ToList();
List<AppAuth.Models.UpdMan> authList = new List<AppAuth.Models.UpdMan>();
// ciclo SOLO tra quelli davvero autorizzati...
foreach (var item in rawList)
{
if (LicServ.checkLicenseActive(item.LicenseKey))
{
authList.Add(item);
}
}
numTot = authList.Count;
foreach (var item in authList)
{