diff --git a/LiMan.Api/Resources/ChangeLog.html b/LiMan.Api/Resources/ChangeLog.html
index 907dc70..d3a2773 100644
--- a/LiMan.Api/Resources/ChangeLog.html
+++ b/LiMan.Api/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 2.1.2502.0318
+ Versione: 2.1.2502.0615
Note di rilascio:
-
diff --git a/LiMan.Api/Resources/VersNum.txt b/LiMan.Api/Resources/VersNum.txt
index df43c49..b1654ba 100644
--- a/LiMan.Api/Resources/VersNum.txt
+++ b/LiMan.Api/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2502.0318
+2.1.2502.0615
diff --git a/LiMan.Api/Resources/manifest.xml b/LiMan.Api/Resources/manifest.xml
index b8a5642..7c51f22 100644
--- a/LiMan.Api/Resources/manifest.xml
+++ b/LiMan.Api/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2502.0318
+ 2.1.2502.0615
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html
false
diff --git a/LiMan.DB/Controllers/DbController.cs b/LiMan.DB/Controllers/DbController.cs
index 5d67dd8..051fb58 100644
--- a/LiMan.DB/Controllers/DbController.cs
+++ b/LiMan.DB/Controllers/DbController.cs
@@ -266,11 +266,12 @@ namespace LiMan.DB.Controllers
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
DateTime oggi = DateTime.Today;
- dbResult = localDbCtx
- .DbSetSubLicenze
- .Where(x => x.IdxLic == idxLic)
- .OrderBy(o => o.VetoUnlock)
- .ToList();
+ var rawRes = localDbCtx
+ .DbSetSubLicenze
+ .Where(x => x.IdxLic == idxLic)
+ .OrderBy(o => o.VetoUnlock)
+ .ToList();
+ dbResult = rawRes != null ? rawRes : dbResult;
}
return dbResult;
}
@@ -1413,13 +1414,13 @@ namespace LiMan.DB.Controllers
{
DateTime oggi = DateTime.Today;
dbResult = localDbCtx
- .DbSetLicenze
- .Where(x => (x.CodApp == CodApp || string.IsNullOrEmpty(CodApp)) && (x.CodInst == CodInst || string.IsNullOrEmpty(CodInst)) && (!OnlyActive || x.Scadenza > oggi))
- .Include(a => a.ApplicativoNav)
- .Include(a => a.Attivazioni)
- .Include(t => t.Tickets.Where(c => c.Status < StatoRichiesta.Approvata))
- .OrderByDescending(o => o.Scadenza)
- .ToList();
+ .DbSetLicenze
+ .Where(x => (x.CodApp == CodApp || string.IsNullOrEmpty(CodApp)) && (x.CodInst == CodInst || string.IsNullOrEmpty(CodInst)) && (!OnlyActive || x.Scadenza > oggi))
+ .Include(a => a.ApplicativoNav)
+ .Include(a => a.Attivazioni)
+ .Include(t => t.Tickets.Where(c => c.Status < StatoRichiesta.Approvata))
+ .OrderByDescending(o => o.Scadenza)
+ .ToList();
}
return dbResult;
}
diff --git a/LiMan.DB/Services/CommonDataServices.cs b/LiMan.DB/Services/CommonDataServices.cs
index 5271a0f..cfcab4c 100644
--- a/LiMan.DB/Services/CommonDataServices.cs
+++ b/LiMan.DB/Services/CommonDataServices.cs
@@ -228,7 +228,7 @@ namespace LiMan.DB.Services
}
///
- /// Effettua sblocco di una licenza impostando data veto a oggi
+ /// Elimina record attivazione
///
///
///
@@ -1113,13 +1113,45 @@ namespace LiMan.DB.Services
///
public async Task
> LicenzeNextGetFilt(SelectNext CurrFilter)
{
- Stopwatch sw = new Stopwatch();
+ string source = "DB";
List dbResult = new List();
- sw.Start();
- dbResult = dbController.GetLicenzeFilt(CurrFilter.OnlyActive, CurrFilter.ApplicazioneSel, CurrFilter.InstallazioneSel);
- sw.Stop();
- Log.Trace($"Effettuata lettura da DB per LicenzeNextGetFilt: {sw.Elapsed.TotalMilliseconds} ms");
- return await Task.FromResult(dbResult);
+ try
+ {
+ string currKey = $"{Const.rKeyConfig}:Next:LicenzeFilt:APP_{CurrFilter.ApplicazioneSel}:INS_{CurrFilter.InstallazioneSel}:OA_{CurrFilter.OnlyActive}";
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ string? rawData = await redisDb.StringGetAsync(currKey);
+ if (!string.IsNullOrEmpty(rawData))
+ {
+ source = "REDIS";
+ var tempResult = JsonConvert.DeserializeObject>(rawData);
+ if (tempResult == null)
+ {
+ dbResult = new List();
+ }
+ else
+ {
+ dbResult = tempResult;
+ }
+ }
+ else
+ {
+ dbResult = dbController.GetLicenzeFilt(CurrFilter.OnlyActive, CurrFilter.ApplicazioneSel, CurrFilter.InstallazioneSel);
+ rawData = JsonConvert.SerializeObject(dbResult, JSSettings);
+ await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
+ }
+ if (dbResult == null)
+ {
+ dbResult = new List();
+ }
+ sw.Stop();
+ Log.Debug($"LicenzeNextGetFilt | {source} in: {sw.Elapsed.TotalMilliseconds:N2} ms");
+ }
+ catch (Exception exc)
+ {
+ Log.Error($"Error during LicenzeNextGetAll:{Environment.NewLine}{exc}");
+ }
+ return dbResult;
}
public async Task LicenzeNextUpdate(LicenzaModel currItem)
diff --git a/LiMan.Transfer/Resources/ChangeLog.html b/LiMan.Transfer/Resources/ChangeLog.html
index c3a7b32..883e98c 100644
--- a/LiMan.Transfer/Resources/ChangeLog.html
+++ b/LiMan.Transfer/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 2.1.2502.0318
+ Versione: 2.1.2502.0615
Note di rilascio:
diff --git a/LiMan.Transfer/Resources/VersNum.txt b/LiMan.Transfer/Resources/VersNum.txt
index df43c49..b1654ba 100644
--- a/LiMan.Transfer/Resources/VersNum.txt
+++ b/LiMan.Transfer/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2502.0318
+2.1.2502.0615
diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml
index 3b6fe1e..a9894d6 100644
--- a/LiMan.Transfer/Resources/manifest.xml
+++ b/LiMan.Transfer/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2502.0318
+ 2.1.2502.0615
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html
false
diff --git a/LiMan.UI/Components/EnrollList.razor b/LiMan.UI/Components/EnrollList.razor
index 37c5ec5..97e4e43 100644
--- a/LiMan.UI/Components/EnrollList.razor
+++ b/LiMan.UI/Components/EnrollList.razor
@@ -120,13 +120,19 @@ else if (SelRecord != null)
Assegnazione licenza
-
+
+
+
@if (SelRecord.IdxLic == 0)
{
-
+
}
-
-
+
+
+
+
+
+
@@ -168,11 +174,14 @@ else if (SelRecord != null)
}
-
-
-
+ @if (!string.IsNullOrEmpty(SelRecord.UserAppr))
+ {
+
-
+ }
}
diff --git a/LiMan.UI/Components/EnrollList.razor.cs b/LiMan.UI/Components/EnrollList.razor.cs
index d3e9116..17df692 100644
--- a/LiMan.UI/Components/EnrollList.razor.cs
+++ b/LiMan.UI/Components/EnrollList.razor.cs
@@ -154,14 +154,41 @@ namespace LiMan.UI.Components
protected async Task DoDelete()
{
- // chiedo conferma...
- if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler eliminare il record?"))
- return;
+ if (SelRecord != null)
+ {
+ // chiedo conferma...
+ if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler eliminare il record?"))
+ return;
- await LMDService.EnrollReqDelete(SelRecord.IdReq);
- await Task.Delay(50);
- SelRecord = null;
- await ReloadData();
+ // cerca l'attivazione collegata x DeviceID (contenuto nel payload) e se lo trova la elimina
+ List listAtt = await LMDService.AttivazioniGetByLic(SelRecord.IdxLic);
+ // se ne ho trovate cerco...
+ if (listAtt.Count > 0)
+ {
+ var dictPayload = JsonConvert.DeserializeObject>(SelRecord.ReqPayload);
+ if (dictPayload != null && dictPayload.Count > 0)
+ {
+ string DeviceID = "";
+ if (dictPayload.ContainsKey("DeviceID"))
+ {
+ DeviceID = dictPayload["DeviceID"];
+ }
+ // cerco attivazioni correlate (tutte)
+ var rec2del = listAtt.Where(x => x.CodImpiego == DeviceID).ToList();
+ if (rec2del != null)
+ {
+ foreach (var rec in rec2del)
+ {
+ await LMDService.AttivazioneDelete(rec.IdxSubLic);
+ }
+ }
+ }
+ }
+ await LMDService.EnrollReqDelete(SelRecord.IdReq);
+ await Task.Delay(10);
+ SelRecord = null;
+ await ReloadData();
+ }
}
protected async Task DoSelect(EnrollRequestModel curRec)
diff --git a/LiMan.UI/Components/SearchEnroll.razor.cs b/LiMan.UI/Components/SearchEnroll.razor.cs
index 6495e33..d28b1fa 100644
--- a/LiMan.UI/Components/SearchEnroll.razor.cs
+++ b/LiMan.UI/Components/SearchEnroll.razor.cs
@@ -70,7 +70,11 @@ namespace LiMan.UI.Components
{
ApplicazioneSel = "UpdateManager"
};
- ListLicenze = await LMDService.LicenzeNextGetFilt(currFilt);
+ var rawList= await LMDService.LicenzeNextGetFilt(currFilt);
+ ListLicenze = rawList
+ .OrderBy(x => x.CodApp)
+ .ThenBy(x => x.CodInst)
+ .ToList();
}
#endregion Protected Methods
diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj
index e9681dc..c7140ca 100644
--- a/LiMan.UI/LiMan.UI.csproj
+++ b/LiMan.UI/LiMan.UI.csproj
@@ -2,7 +2,7 @@
net6.0
- 2.1.2502.0612
+ 2.1.2502.0615
LiMan.UI
LiMan.UI
diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html
index 3ea196a..d3a2773 100644
--- a/LiMan.UI/Resources/ChangeLog.html
+++ b/LiMan.UI/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 2.1.2502.0612
+ Versione: 2.1.2502.0615
Note di rilascio:
-
diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt
index 4db6f0d..b1654ba 100644
--- a/LiMan.UI/Resources/VersNum.txt
+++ b/LiMan.UI/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2502.0612
+2.1.2502.0615
diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml
index ba05b3f..7c51f22 100644
--- a/LiMan.UI/Resources/manifest.xml
+++ b/LiMan.UI/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2502.0612
+ 2.1.2502.0615
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html
false