diff --git a/LiMan.Api/Data/ApiDataService.cs b/LiMan.Api/Data/ApiDataService.cs
index cb7d378..9f48f0a 100644
--- a/LiMan.Api/Data/ApiDataService.cs
+++ b/LiMan.Api/Data/ApiDataService.cs
@@ -47,7 +47,6 @@ namespace LiMan.APi.Data
///
///
public ApiDataService(IConfiguration configuration, ILogger logger, IEmailSender emailSender, IRedisCacheClient redisCacheClient, IConnectionMultiplexer redisConnMult)
- //public ApiDataService(IConfiguration configuration, ILogger logger, IDistributedCache distributedCache, IEmailSender emailSender, IRedisCacheClient redisCacheClient)
{
_logger = logger;
_configuration = configuration;
@@ -1733,7 +1732,6 @@ namespace LiMan.APi.Data
private readonly IEmailSender _emailSender;
- //private readonly IDistributedCache distributedCache;
private readonly IRedisCacheClient _redisCacheClient;
///
diff --git a/LiMan.Api/Resources/ChangeLog.html b/LiMan.Api/Resources/ChangeLog.html
index 2a88e01..30894b2 100644
--- a/LiMan.Api/Resources/ChangeLog.html
+++ b/LiMan.Api/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 2.1.2501.2909
+ Versione: 2.1.2501.2910
Note di rilascio:
-
diff --git a/LiMan.Api/Resources/VersNum.txt b/LiMan.Api/Resources/VersNum.txt
index 2d9c15f..83dfcaa 100644
--- a/LiMan.Api/Resources/VersNum.txt
+++ b/LiMan.Api/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2501.2909
+2.1.2501.2910
diff --git a/LiMan.Api/Resources/manifest.xml b/LiMan.Api/Resources/manifest.xml
index 2914bb0..dba703e 100644
--- a/LiMan.Api/Resources/manifest.xml
+++ b/LiMan.Api/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2501.2909
+ 2.1.2501.2910
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.Transfer/Resources/ChangeLog.html b/LiMan.Transfer/Resources/ChangeLog.html
index c3b1591..6501505 100644
--- a/LiMan.Transfer/Resources/ChangeLog.html
+++ b/LiMan.Transfer/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
-
Versione: 2.1.2501.2909
+ Versione: 2.1.2501.2910
Note di rilascio:
diff --git a/LiMan.Transfer/Resources/VersNum.txt b/LiMan.Transfer/Resources/VersNum.txt
index 2d9c15f..83dfcaa 100644
--- a/LiMan.Transfer/Resources/VersNum.txt
+++ b/LiMan.Transfer/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2501.2909
+2.1.2501.2910
diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml
index f07b6de..2d49877 100644
--- a/LiMan.Transfer/Resources/manifest.xml
+++ b/LiMan.Transfer/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2501.2909
+ 2.1.2501.2910
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/Activations.razor.cs b/LiMan.UI/Components/Activations.razor.cs
index 1d6a42f..01786e7 100644
--- a/LiMan.UI/Components/Activations.razor.cs
+++ b/LiMan.UI/Components/Activations.razor.cs
@@ -179,7 +179,7 @@ namespace LiMan.UI.Components
private async Task fullReload()
{
- await DataService.InvalidateAllCache();
+ await DataService.FlushRedisCache();
await ReloadAllData();
}
diff --git a/LiMan.UI/Components/ListApplicazioni.razor.cs b/LiMan.UI/Components/ListApplicazioni.razor.cs
index 920c85a..f722fb1 100644
--- a/LiMan.UI/Components/ListApplicazioni.razor.cs
+++ b/LiMan.UI/Components/ListApplicazioni.razor.cs
@@ -281,7 +281,7 @@ namespace LiMan.UI.Components
{
recordEdit = null;
recordSel = null;
- await DataService.InvalidateAllCache();
+ await DataService.FlushRedisCache();
await ReloadAllData();
}
diff --git a/LiMan.UI/Components/ListApplicazioniGLS.razor.cs b/LiMan.UI/Components/ListApplicazioniGLS.razor.cs
index 8efdc1c..cec8fa0 100644
--- a/LiMan.UI/Components/ListApplicazioniGLS.razor.cs
+++ b/LiMan.UI/Components/ListApplicazioniGLS.razor.cs
@@ -11,6 +11,91 @@ namespace LiMan.UI.Components
{
public partial class ListApplicazioniGLS : ComponentBase, IDisposable
{
+ #region Public Methods
+
+ public string checkSelect(string Applicativo)
+ {
+ string answ = "";
+ if (currRecord != null)
+ {
+ try
+ {
+ answ = (currRecord.Applicativo == Applicativo) ? "table-info" : "";
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+
+ public void Dispose()
+ {
+ }
+
+ #endregion Public Methods
+
+ #region Protected Fields
+
+ protected int totalCount = 0;
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ [Inject]
+ protected MessageService AppMService { get; set; }
+
+ [Inject]
+ protected LiManDataService DataService { get; set; }
+
+ [Inject]
+ protected IJSRuntime JSRuntime { get; set; }
+
+ [Inject]
+ protected NavigationManager NavManager { get; set; }
+
+ protected bool showCamera { get; set; } = false;
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected void Edit(AnagApplicazioni selRecord)
+ {
+ currRecord = selRecord;
+ }
+
+ protected override async Task OnInitializedAsync()
+ {
+ await ReloadAllData();
+ }
+
+ protected async Task PagerReloadNum(int newNum)
+ {
+ numRecord = newNum;
+ await ReloadAllData();
+ isLoading = false;
+ }
+
+ protected async Task PagerReloadPage(int newNum)
+ {
+ currPage = newNum;
+ await ReloadAllData();
+ isLoading = false;
+ }
+
+ protected async Task ResetData()
+ {
+ await FullReload();
+ }
+
+ protected async Task UpdateData()
+ {
+ await FullReload();
+ }
+
+ #endregion Protected Methods
+
#region Private Fields
private AnagApplicazioni currRecord = null;
@@ -19,12 +104,6 @@ namespace LiMan.UI.Components
#endregion Private Fields
- #region Protected Fields
-
- protected int totalCount = 0;
-
- #endregion Protected Fields
-
#region Private Properties
private int currPage
@@ -55,30 +134,12 @@ namespace LiMan.UI.Components
#endregion Private Properties
- #region Protected Properties
-
- [Inject]
- protected MessageService AppMService { get; set; }
-
- [Inject]
- protected LiManDataService DataService { get; set; }
-
- [Inject]
- protected IJSRuntime JSRuntime { get; set; }
-
- [Inject]
- protected NavigationManager NavManager { get; set; }
-
- protected bool showCamera { get; set; } = false;
-
- #endregion Protected Properties
-
#region Private Methods
- private async Task fullReload()
+ private async Task FullReload()
{
currRecord = null;
- await DataService.InvalidateAllCache();
+ await DataService.FlushRedisCache();
await ReloadAllData();
}
@@ -94,66 +155,5 @@ namespace LiMan.UI.Components
}
#endregion Private Methods
-
- #region Protected Methods
-
- protected void Edit(AnagApplicazioni selRecord)
- {
- currRecord = selRecord;
- }
-
- protected override async Task OnInitializedAsync()
- {
- await ReloadAllData();
- }
-
- protected async Task PagerReloadNum(int newNum)
- {
- numRecord = newNum;
- await ReloadAllData();
- isLoading = false;
- }
-
- protected async Task PagerReloadPage(int newNum)
- {
- currPage = newNum;
- await ReloadAllData();
- isLoading = false;
- }
-
- protected async Task ResetData()
- {
- await fullReload();
- }
-
- protected async Task UpdateData()
- {
- await fullReload();
- }
-
- #endregion Protected Methods
-
- #region Public Methods
-
- public string checkSelect(string Applicativo)
- {
- string answ = "";
- if (currRecord != null)
- {
- try
- {
- answ = (currRecord.Applicativo == Applicativo) ? "table-info" : "";
- }
- catch
- { }
- }
- return answ;
- }
-
- public void Dispose()
- {
- }
-
- #endregion Public Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Components/ListAttach.razor.cs b/LiMan.UI/Components/ListAttach.razor.cs
index 5e4bd97..46f8087 100644
--- a/LiMan.UI/Components/ListAttach.razor.cs
+++ b/LiMan.UI/Components/ListAttach.razor.cs
@@ -1,10 +1,7 @@
-using Core;
using LiMan.DB.DBModels;
-using LiMan.DB.DTO;
using LiMan.UI.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -13,29 +10,51 @@ namespace LiMan.UI.Components
{
public partial class ListAttach
{
- private List ListRecords;
+ #region Public Properties
+
+ [Parameter]
+ public EventCallback DataReset { get; set; }
+
+ #endregion Public Properties
+
+ #region Protected Fields
+
protected int totalCount = 0;
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ [Inject]
+ protected LiManDataService DataService { get; set; }
+
+ #endregion Protected Properties
+
+ #region Private Fields
+
+ private List ListRecords;
+
+ #endregion Private Fields
+
//protected override async Task OnInitializedAsync()
//{
// await ReloadAllData();
//}
+ #region Private Properties
+
private bool isLoading { get; set; } = false;
[Inject]
private IJSRuntime JSRuntime { get; set; }
- [Inject]
- protected LiManDataService DataService { get; set; }
+ #endregion Private Properties
+ #region Private Methods
- [Parameter]
- public EventCallback DataReset { get; set; }
-
- private async Task fullReload()
+ private async Task FullReload()
{
- await DataService.InvalidateAllCache();
+ await DataService.FlushRedisCache();
await ReloadAllData();
}
@@ -50,5 +69,7 @@ namespace LiMan.UI.Components
totalCount = ListRecords.Count();
//isLoading = false;
}
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Components/ListInstallazioni.razor.cs b/LiMan.UI/Components/ListInstallazioni.razor.cs
index 4c8dced..291cce3 100644
--- a/LiMan.UI/Components/ListInstallazioni.razor.cs
+++ b/LiMan.UI/Components/ListInstallazioni.razor.cs
@@ -11,13 +11,28 @@ namespace LiMan.UI.Components
{
public partial class ListInstallazioni : ComponentBase, IDisposable
{
- #region Private Fields
+ #region Public Methods
- private InstallazioneModel currRecord = null;
- private List ListRecords;
- private List SearchRecords;
+ public string checkSelect(string CodInst)
+ {
+ string answ = "";
+ if (currRecord != null)
+ {
+ try
+ {
+ answ = (currRecord.CodInst == CodInst) ? "table-info" : "";
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
- #endregion Private Fields
+ public void Dispose()
+ {
+ }
+
+ #endregion Public Methods
#region Protected Fields
@@ -25,36 +40,6 @@ namespace LiMan.UI.Components
#endregion Protected Fields
- #region Private Properties
-
- private int currPage
- {
- get
- {
- return AppMService.PageNum;
- }
- set
- {
- AppMService.PageNum = value;
- }
- }
-
- private bool isLoading { get; set; } = false;
-
- private int numRecord
- {
- get
- {
- return AppMService.PageSize;
- }
- set
- {
- AppMService.PageSize = value;
- }
- }
-
- #endregion Private Properties
-
#region Protected Properties
[Inject]
@@ -73,28 +58,6 @@ namespace LiMan.UI.Components
#endregion Protected Properties
- #region Private Methods
-
- private async Task fullReload()
- {
- currRecord = null;
- await DataService.InvalidateAllCache();
- await ReloadAllData();
- }
-
- private async Task ReloadAllData()
- {
- isLoading = true;
- await Task.Delay(1);
- //SearchRecords = null;
- SearchRecords = await DataService.InstallazioniNextGetAll();
- totalCount = SearchRecords.Count();
- ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
- isLoading = false;
- }
-
- #endregion Private Methods
-
#region Protected Methods
protected void AddNew()
@@ -135,37 +98,74 @@ namespace LiMan.UI.Components
protected async Task ResetData()
{
- await fullReload();
+ await FullReload();
}
protected async Task UpdateData()
{
- await fullReload();
+ await FullReload();
}
#endregion Protected Methods
- #region Public Methods
+ #region Private Fields
- public string checkSelect(string CodInst)
+ private InstallazioneModel currRecord = null;
+ private List ListRecords;
+ private List SearchRecords;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private int currPage
{
- string answ = "";
- if (currRecord != null)
+ get
{
- try
- {
- answ = (currRecord.CodInst == CodInst) ? "table-info" : "";
- }
- catch
- { }
+ return AppMService.PageNum;
+ }
+ set
+ {
+ AppMService.PageNum = value;
}
- return answ;
}
- public void Dispose()
+ private bool isLoading { get; set; } = false;
+
+ private int numRecord
{
+ get
+ {
+ return AppMService.PageSize;
+ }
+ set
+ {
+ AppMService.PageSize = value;
+ }
}
- #endregion Public Methods
+ #endregion Private Properties
+
+ #region Private Methods
+
+ private async Task FullReload()
+ {
+ currRecord = null;
+ await DataService.FlushRedisCache();
+ await ReloadAllData();
+ }
+
+ private async Task ReloadAllData()
+ {
+ isLoading = true;
+ await Task.Delay(1);
+ //SearchRecords = null;
+ SearchRecords = await DataService.InstallazioniNextGetAll();
+ totalCount = SearchRecords.Count();
+ ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+ isLoading = false;
+ }
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Components/ListInstallazioniGLS.razor.cs b/LiMan.UI/Components/ListInstallazioniGLS.razor.cs
index 53a702d..f29306b 100644
--- a/LiMan.UI/Components/ListInstallazioniGLS.razor.cs
+++ b/LiMan.UI/Components/ListInstallazioniGLS.razor.cs
@@ -11,13 +11,28 @@ namespace LiMan.UI.Components
{
public partial class ListInstallazioniGLS : ComponentBase, IDisposable
{
- #region Private Fields
+ #region Public Methods
- private AnagInstallazioni currRecord = null;
- private List ListRecords;
- private List SearchRecords;
+ public string checkSelect(string Installazione)
+ {
+ string answ = "";
+ if (currRecord != null)
+ {
+ try
+ {
+ answ = (currRecord.Installazione == Installazione) ? "table-info" : "";
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
- #endregion Private Fields
+ public void Dispose()
+ {
+ }
+
+ #endregion Public Methods
#region Protected Fields
@@ -25,36 +40,6 @@ namespace LiMan.UI.Components
#endregion Protected Fields
- #region Private Properties
-
- private int currPage
- {
- get
- {
- return AppMService.PageNum;
- }
- set
- {
- AppMService.PageNum = value;
- }
- }
-
- private bool isLoading { get; set; } = false;
-
- private int numRecord
- {
- get
- {
- return AppMService.PageSize;
- }
- set
- {
- AppMService.PageSize = value;
- }
- }
-
- #endregion Private Properties
-
#region Protected Properties
[Inject]
@@ -73,28 +58,6 @@ namespace LiMan.UI.Components
#endregion Protected Properties
- #region Private Methods
-
- private async Task fullReload()
- {
- currRecord = null;
- await DataService.InvalidateAllCache();
- await ReloadAllData();
- }
-
- private async Task ReloadAllData()
- {
- isLoading = true;
- await Task.Delay(1);
- //SearchRecords = null;
- SearchRecords = await DataService.InstallazioniGLSGetAll();
- totalCount = SearchRecords.Count();
- ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
- isLoading = false;
- }
-
- #endregion Private Methods
-
#region Protected Methods
protected void Edit(AnagInstallazioni selRecord)
@@ -126,37 +89,74 @@ namespace LiMan.UI.Components
protected async Task ResetData()
{
- await fullReload();
+ await FullReload();
}
protected async Task UpdateData()
{
- await fullReload();
+ await FullReload();
}
#endregion Protected Methods
- #region Public Methods
+ #region Private Fields
- public string checkSelect(string Installazione)
+ private AnagInstallazioni currRecord = null;
+ private List ListRecords;
+ private List SearchRecords;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private int currPage
{
- string answ = "";
- if (currRecord != null)
+ get
{
- try
- {
- answ = (currRecord.Installazione == Installazione) ? "table-info" : "";
- }
- catch
- { }
+ return AppMService.PageNum;
+ }
+ set
+ {
+ AppMService.PageNum = value;
}
- return answ;
}
- public void Dispose()
+ private bool isLoading { get; set; } = false;
+
+ private int numRecord
{
+ get
+ {
+ return AppMService.PageSize;
+ }
+ set
+ {
+ AppMService.PageSize = value;
+ }
}
- #endregion Public Methods
+ #endregion Private Properties
+
+ #region Private Methods
+
+ private async Task FullReload()
+ {
+ currRecord = null;
+ await DataService.FlushRedisCache();
+ await ReloadAllData();
+ }
+
+ private async Task ReloadAllData()
+ {
+ isLoading = true;
+ await Task.Delay(1);
+ //SearchRecords = null;
+ SearchRecords = await DataService.InstallazioniGLSGetAll();
+ totalCount = SearchRecords.Count();
+ ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+ isLoading = false;
+ }
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Components/ListLicenze.razor.cs b/LiMan.UI/Components/ListLicenze.razor.cs
index 8e3499e..2037c18 100644
--- a/LiMan.UI/Components/ListLicenze.razor.cs
+++ b/LiMan.UI/Components/ListLicenze.razor.cs
@@ -60,8 +60,6 @@ namespace LiMan.UI.Components
aTimer.Start();
}
- private bool UserCanEdit { get; set; } = false;
-
#endregion Public Methods
#region Protected Fields
@@ -191,7 +189,7 @@ namespace LiMan.UI.Components
protected async Task ResetData()
{
- await fullReload();
+ await FullReload();
}
protected void resetShowDetail()
@@ -223,7 +221,7 @@ namespace LiMan.UI.Components
protected async Task UpdateActivData()
{
int idxLic = currRecord.IdxLic;
- await fullReload();
+ await FullReload();
currRecord = ListRecords.Where(x => x.IdxLic == idxLic).FirstOrDefault();
resetShowDetail();
showActivations = true;
@@ -232,7 +230,7 @@ namespace LiMan.UI.Components
protected async Task UpdateTicketData()
{
int idxLic = currRecord.IdxLic;
- await fullReload();
+ await FullReload();
currRecord = ListRecords.Where(x => x.IdxLic == idxLic).FirstOrDefault();
resetShowDetail();
showTickets = true;
@@ -256,7 +254,6 @@ namespace LiMan.UI.Components
private bool showActivations = false;
private bool showTickets = false;
private Dictionary UserClaimsLUT = new Dictionary();
-
private string userName = "";
#endregion Private Fields
@@ -365,6 +362,8 @@ namespace LiMan.UI.Components
}
}
+ private bool UserCanEdit { get; set; } = false;
+
#endregion Private Properties
#region Private Methods
@@ -376,11 +375,11 @@ namespace LiMan.UI.Components
pUpd.Wait();
}
- private async Task fullReload()
+ private async Task FullReload()
{
currRecord = null;
resetShowDetail();
- await DataService.InvalidateAllCache();
+ await DataService.FlushRedisCache();
await ReloadAllData();
}
diff --git a/LiMan.UI/Components/ListLicenzeGLS.razor.cs b/LiMan.UI/Components/ListLicenzeGLS.razor.cs
index b33fcb7..f8d2e78 100644
--- a/LiMan.UI/Components/ListLicenzeGLS.razor.cs
+++ b/LiMan.UI/Components/ListLicenzeGLS.razor.cs
@@ -11,6 +11,119 @@ namespace LiMan.UI.Components
{
public partial class ListLicenzeGLS : ComponentBase, IDisposable
{
+ #region Public Methods
+
+ public string checkSelect(int IdxLic)
+ {
+ string answ = "";
+ if (currRecord != null)
+ {
+ try
+ {
+ answ = (currRecord.IdxLic == IdxLic) ? "table-info" : "";
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+
+ public void Dispose()
+ {
+ }
+
+ #endregion Public Methods
+
+ #region Protected Fields
+
+ protected int totalCount = 0;
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ [Inject]
+ protected MessageService AppMService { get; set; }
+
+ [Inject]
+ protected LiManDataService DataService { get; set; }
+
+ [Inject]
+ protected IJSRuntime JSRuntime { get; set; }
+
+ [Inject]
+ protected NavigationManager NavManager { get; set; }
+
+ protected bool showCamera { get; set; } = false;
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// formatta testo secondo scadenza:
+ /// scadenza > 60gg --> verde
+ /// 0 < scadenza < 60 gg --> giallo
+ /// scadenza < 0 --> rosso
+ ///
+ ///
+ ///
+ protected string cssScadenza(DateTime scadenza)
+ {
+ string answ = "text-dark";
+ double periodo = scadenza.Subtract(DateTime.Today).TotalDays;
+ if (periodo > 60)
+ {
+ answ = "text-success";
+ }
+ else if (periodo > 0)
+ {
+ answ = "text-warning";
+ }
+ else
+ {
+ answ = "text-danger";
+ }
+
+ return answ;
+ }
+
+ protected void Edit(LicenzeAttive selRecord)
+ {
+ currRecord = selRecord;
+ }
+
+ protected override async Task OnInitializedAsync()
+ {
+ await ReloadAllData();
+ }
+
+ protected async Task PagerReloadNum(int newNum)
+ {
+ numRecord = newNum;
+ await ReloadAllData();
+ isLoading = false;
+ }
+
+ protected async Task PagerReloadPage(int newNum)
+ {
+ currPage = newNum;
+ await ReloadAllData();
+ isLoading = false;
+ }
+
+ protected async Task ResetData()
+ {
+ await FullReload();
+ }
+
+ protected async Task UpdateData()
+ {
+ await FullReload();
+ }
+
+ #endregion Protected Methods
+
#region Private Fields
private LicenzeAttive currRecord = null;
@@ -22,12 +135,6 @@ namespace LiMan.UI.Components
#endregion Private Fields
- #region Protected Fields
-
- protected int totalCount = 0;
-
- #endregion Protected Fields
-
#region Private Properties
private int currPage
@@ -146,30 +253,12 @@ namespace LiMan.UI.Components
#endregion Private Properties
- #region Protected Properties
-
- [Inject]
- protected MessageService AppMService { get; set; }
-
- [Inject]
- protected LiManDataService DataService { get; set; }
-
- [Inject]
- protected IJSRuntime JSRuntime { get; set; }
-
- [Inject]
- protected NavigationManager NavManager { get; set; }
-
- protected bool showCamera { get; set; } = false;
-
- #endregion Protected Properties
-
#region Private Methods
- private async Task fullReload()
+ private async Task FullReload()
{
currRecord = null;
- await DataService.InvalidateAllCache();
+ await DataService.FlushRedisCache();
await ReloadAllData();
}
@@ -187,94 +276,5 @@ namespace LiMan.UI.Components
}
#endregion Private Methods
-
- #region Protected Methods
-
- ///
- /// formatta testo secondo scadenza:
- /// scadenza > 60gg --> verde
- /// 0 < scadenza < 60 gg --> giallo
- /// scadenza < 0 --> rosso
- ///
- ///
- ///
- protected string cssScadenza(DateTime scadenza)
- {
- string answ = "text-dark";
- double periodo = scadenza.Subtract(DateTime.Today).TotalDays;
- if (periodo > 60)
- {
- answ = "text-success";
- }
- else if (periodo > 0)
- {
- answ = "text-warning";
- }
- else
- {
- answ = "text-danger";
- }
-
- return answ;
- }
-
- protected void Edit(LicenzeAttive selRecord)
- {
- currRecord = selRecord;
- }
-
- protected override async Task OnInitializedAsync()
- {
- await ReloadAllData();
- }
-
- protected async Task PagerReloadNum(int newNum)
- {
- numRecord = newNum;
- await ReloadAllData();
- isLoading = false;
- }
-
- protected async Task PagerReloadPage(int newNum)
- {
- currPage = newNum;
- await ReloadAllData();
- isLoading = false;
- }
-
- protected async Task ResetData()
- {
- await fullReload();
- }
-
- protected async Task UpdateData()
- {
- await fullReload();
- }
-
- #endregion Protected Methods
-
- #region Public Methods
-
- public string checkSelect(int IdxLic)
- {
- string answ = "";
- if (currRecord != null)
- {
- try
- {
- answ = (currRecord.IdxLic == IdxLic) ? "table-info" : "";
- }
- catch
- { }
- }
- return answ;
- }
-
- public void Dispose()
- {
- }
-
- #endregion Public Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Components/StatsCallList.razor b/LiMan.UI/Components/StatsCallList.razor
index f42dd52..e640395 100644
--- a/LiMan.UI/Components/StatsCallList.razor
+++ b/LiMan.UI/Components/StatsCallList.razor
@@ -37,7 +37,7 @@
|
-
+
|
Anno |
Codice |
diff --git a/LiMan.UI/Components/StatsCallList.razor.cs b/LiMan.UI/Components/StatsCallList.razor.cs
index f9ece43..686ebe4 100644
--- a/LiMan.UI/Components/StatsCallList.razor.cs
+++ b/LiMan.UI/Components/StatsCallList.razor.cs
@@ -69,7 +69,7 @@ namespace LiMan.UI.Components
protected async Task ResetData()
{
- await fullReload();
+ await FullReload();
}
protected void Select(StatsCallModel selRecord)
@@ -79,7 +79,7 @@ namespace LiMan.UI.Components
protected async Task UpdateData()
{
- await fullReload();
+ await FullReload();
}
#endregion Protected Methods
@@ -162,15 +162,15 @@ namespace LiMan.UI.Components
{
var pUpd = Task.Run(async () =>
{
- await fullReload();
+ await FullReload();
});
pUpd.Wait();
}
- private async Task fullReload()
+ private async Task FullReload()
{
currRecord = null;
- await DataService.InvalidateAllCache();
+ await DataService.FlushRedisCache();
await ReloadAllData();
}
diff --git a/LiMan.UI/Components/Tickets.razor.cs b/LiMan.UI/Components/Tickets.razor.cs
index a4477fb..e7a0c60 100644
--- a/LiMan.UI/Components/Tickets.razor.cs
+++ b/LiMan.UI/Components/Tickets.razor.cs
@@ -15,212 +15,80 @@ namespace LiMan.UI.Components
{
public partial class Tickets
{
- #region Private Fields
+ #region Public Methods
- private List ListRecords;
- private List SearchRecords;
- private List ListInstall;
- private List ListActivations;
- private List ListApp;
- protected int totalCount = 0;
+ public string checkSelect(int IdxSubLic)
+ {
+ string answ = "";
+ if (currRecord != null)
+ {
+ try
+ {
+ answ = (currRecord.IdxSubLic == IdxSubLic) ? "table-info" : "";
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
- protected TipologiaTicket currTipo = TipologiaTicket.ND;
+ public string decryptAuthKey(string authKey)
+ {
+ string answ = authKey;
+ try
+ {
+ answ = SteamCrypto.DecryptString(authKey, "AuthGPW");
+ }
+ catch
+ { }
+ return answ;
+ }
- private List FileAttached;
+ public string selTick(int idxTicket)
+ {
+ string answ = " ";
- private bool showTickets = false;
+ if (idxTicketSel == idxTicket)
+ {
+ answ = "table-primary";
+ }
+ return answ;
+ }
- #endregion Private Fields
+ #endregion Public Methods
#region Protected Fields
protected SubLicenzaModel _currRecord = new SubLicenzaModel();
-
protected LicenzaModel _masterLic = new LicenzaModel();
-
+ protected TipologiaTicket currTipo = TipologiaTicket.ND;
protected int idxTicketSel = 0;
-
- protected StatoRichiesta StatusSel = StatoRichiesta.ND;
-
protected bool showKey = false;
+ protected StatoRichiesta StatusSel = StatoRichiesta.ND;
+ protected int totalCount = 0;
#endregion Protected Fields
- #region Private Properties
-
- private SubLicenzaModel currRecord
- {
- get
- {
- return _currRecord;
- }
- set
- {
- _currRecord = value;
- }
- }
-
- protected override async Task OnInitializedAsync()
- {
- await ReloadAllData();
- }
-
- private bool isLoading { get; set; } = false;
-
- [Inject]
- private IJSRuntime JSRuntime { get; set; }
-
- #endregion Private Properties
-
#region Protected Properties
- [Inject]
- protected LiManDataService DataService { get; set; }
-
- #endregion Protected Properties
-
- #region Public Properties
-
- //[Parameter]
- //public EventCallback DataReset { get; set; }
-
- //[Parameter]
- //public EventCallback DataUpdated { get; set; }
-
- //[Parameter]
- //public LicenzaModel MasterLicence
- //{
- // get
- // {
- // return _masterLic;
- // }
- // set
- // {
- // _masterLic = value;
- // var pUpd = Task.Run(async () => await ReloadAllData());
- // pUpd.Wait();
- // }
- //}
-
- #endregion Public Properties
-
- #region Private Methods
-
[Inject]
protected MessageService AppMService { get; set; }
- private async Task fullReload()
- {
- await DataService.InvalidateAllCache();
- await ReloadAllData();
- }
+ [Inject]
+ protected LiManDataService DataService { get; set; }
protected string mainCss
{
get => idxTicketSel == 0 ? "col-12" : "col-8";
}
- private async Task ReloadAllData()
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected async void closeDet()
{
- isLoading = true;
- idxTicketSel = 0;
- await Task.Delay(1);
- showTickets = false;
- ListApp = await DataService.ApplicazioniNextGetAll();
- ListInstall = await DataService.InstallazioniNextGetAll();
- //bool StatoRichiesta = true;
- //SearchRecords = await LMDService.LicenzeNextGetFilt(AppMServ.DetailDBFilter);
- SearchRecords = await DataService.TicketsGetFilt(true, SelApp, SelInst);
- //totalCount = SearchRecords.Count();
- //SearchRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
-
- //SearchRecords = await LMDService.TicketsGetAll();
- ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
-
- totalCount = SearchRecords.Count();
- isLoading = false;
- }
-
- private string SelInst
- {
- get
- {
- string answ = "";
- if (AppMService.DetailDBFilter != null)
- {
- answ = AppMService.DetailDBFilter.InstallazioneSel;
- }
- return answ;
- }
- set
- {
- if (!AppMService.DetailDBFilter.InstallazioneSel.Equals(value))
- {
- AppMService.DetailDBFilter.InstallazioneSel = value;
- var pUpd = Task.Run(async () => await ReloadAllData());
- pUpd.Wait();
- }
- }
- }
-
- private string SelApp
- {
- get
- {
- string answ = "";
- if (AppMService.DetailDBFilter != null)
- {
- answ = AppMService.DetailDBFilter.ApplicazioneSel;
- }
- return answ;
- }
- set
- {
- if (!AppMService.DetailDBFilter.ApplicazioneSel.Equals(value))
- {
- AppMService.DetailDBFilter.ApplicazioneSel = value;
- var pUpd = Task.Run(async () => await ReloadAllData());
- pUpd.Wait();
- }
- }
- }
-
- private int numRecord
- {
- get
- {
- return AppMService.PageSize;
- }
- set
- {
- AppMService.PageSize = value;
- }
- }
-
- private int currPage
- {
- get
- {
- return AppMService.PageNum;
- }
- set
- {
- AppMService.PageNum = value;
- }
- }
-
- protected async Task PagerReloadNum(int newNum)
- {
- numRecord = newNum;
await ReloadAllData();
- isLoading = false;
- }
-
- protected async Task PagerReloadPage(int newNum)
- {
- currPage = newNum;
- await ReloadAllData();
- isLoading = false;
}
//private async void DownloadFileFromURL(string fileName, string rawUrl)
@@ -231,16 +99,6 @@ namespace LiMan.UI.Components
// //var fileName = FileAttached;
// await JS.InvokeVoidAsync("triggerFileDownload", fileName, fileURL);
//}
-
- #endregion Private Methods
-
- #region Protected Methods
-
- protected async void closeDet()
- {
- await ReloadAllData();
- }
-
///
/// formatta testo secondo scadenza:
/// scadenza < oggi --> verde
@@ -264,9 +122,28 @@ namespace LiMan.UI.Components
return answ;
}
+ protected override async Task OnInitializedAsync()
+ {
+ await ReloadAllData();
+ }
+
+ protected async Task PagerReloadNum(int newNum)
+ {
+ numRecord = newNum;
+ await ReloadAllData();
+ isLoading = false;
+ }
+
+ protected async Task PagerReloadPage(int newNum)
+ {
+ currPage = newNum;
+ await ReloadAllData();
+ isLoading = false;
+ }
+
protected async Task ResetData()
{
- await fullReload();
+ await FullReload();
}
protected void showDecrypt()
@@ -316,46 +193,156 @@ namespace LiMan.UI.Components
#endregion Protected Methods
- #region Public Methods
+ #region Private Fields
- public string checkSelect(int IdxSubLic)
+ private List FileAttached;
+ private List ListActivations;
+ private List ListApp;
+ private List ListInstall;
+ private List ListRecords;
+ private List SearchRecords;
+ private bool showTickets = false;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private int currPage
{
- string answ = "";
- if (currRecord != null)
+ get
{
- try
+ return AppMService.PageNum;
+ }
+ set
+ {
+ AppMService.PageNum = value;
+ }
+ }
+
+ private SubLicenzaModel currRecord
+ {
+ get
+ {
+ return _currRecord;
+ }
+ set
+ {
+ _currRecord = value;
+ }
+ }
+
+ private bool isLoading { get; set; } = false;
+
+ [Inject]
+ private IJSRuntime JSRuntime { get; set; }
+
+ //[Parameter]
+ //public EventCallback DataReset { get; set; }
+
+ //[Parameter]
+ //public EventCallback DataUpdated { get; set; }
+
+ private int numRecord
+ {
+ get
+ {
+ return AppMService.PageSize;
+ }
+ set
+ {
+ AppMService.PageSize = value;
+ }
+ }
+
+ private string SelApp
+ {
+ get
+ {
+ string answ = "";
+ if (AppMService.DetailDBFilter != null)
{
- answ = (currRecord.IdxSubLic == IdxSubLic) ? "table-info" : "";
+ answ = AppMService.DetailDBFilter.ApplicazioneSel;
}
- catch
- { }
+ return answ;
}
- return answ;
- }
-
- public string decryptAuthKey(string authKey)
- {
- string answ = authKey;
- try
+ set
{
- answ = SteamCrypto.DecryptString(authKey, "AuthGPW");
+ if (!AppMService.DetailDBFilter.ApplicazioneSel.Equals(value))
+ {
+ AppMService.DetailDBFilter.ApplicazioneSel = value;
+ var pUpd = Task.Run(async () => await ReloadAllData());
+ pUpd.Wait();
+ }
}
- catch
- { }
- return answ;
}
- public string selTick(int idxTicket)
+ private string SelInst
{
- string answ = " ";
-
- if (idxTicketSel == idxTicket)
+ get
{
- answ = "table-primary";
+ string answ = "";
+ if (AppMService.DetailDBFilter != null)
+ {
+ answ = AppMService.DetailDBFilter.InstallazioneSel;
+ }
+ return answ;
+ }
+ set
+ {
+ if (!AppMService.DetailDBFilter.InstallazioneSel.Equals(value))
+ {
+ AppMService.DetailDBFilter.InstallazioneSel = value;
+ var pUpd = Task.Run(async () => await ReloadAllData());
+ pUpd.Wait();
+ }
}
- return answ;
}
- #endregion Public Methods
+ #endregion Private Properties
+
+ #region Private Methods
+
+ //[Parameter]
+ //public LicenzaModel MasterLicence
+ //{
+ // get
+ // {
+ // return _masterLic;
+ // }
+ // set
+ // {
+ // _masterLic = value;
+ // var pUpd = Task.Run(async () => await ReloadAllData());
+ // pUpd.Wait();
+ // }
+ //}
+ private async Task FullReload()
+ {
+ await DataService.FlushRedisCache();
+ await ReloadAllData();
+ }
+
+ private async Task ReloadAllData()
+ {
+ isLoading = true;
+ idxTicketSel = 0;
+ await Task.Delay(1);
+ showTickets = false;
+ ListApp = await DataService.ApplicazioniNextGetAll();
+ ListInstall = await DataService.InstallazioniNextGetAll();
+ //bool StatoRichiesta = true;
+ //SearchRecords = await LMDService.LicenzeNextGetFilt(AppMServ.DetailDBFilter);
+ SearchRecords = await DataService.TicketsGetFilt(true, SelApp, SelInst);
+ //totalCount = SearchRecords.Count();
+ //SearchRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+
+ //SearchRecords = await LMDService.TicketsGetAll();
+ ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+
+ totalCount = SearchRecords.Count();
+ isLoading = false;
+ }
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Components/TicketsHP.razor.cs b/LiMan.UI/Components/TicketsHP.razor.cs
index 456ac6a..9b74445 100644
--- a/LiMan.UI/Components/TicketsHP.razor.cs
+++ b/LiMan.UI/Components/TicketsHP.razor.cs
@@ -10,69 +10,10 @@ using System.Linq;
using System.Threading.Tasks;
using static Core.Enum;
-
namespace LiMan.UI.Components
{
public partial class TicketsHP
{
- #region Private Fields
-
- private List ListActivations;
- private List ListRecords;
-
- #endregion Private Fields
-
- #region Protected Fields
-
- protected SubLicenzaModel _currRecord = new SubLicenzaModel();
-
- protected LicenzaModel _masterLic = new LicenzaModel();
-
- private List FileAttached;
-
- protected int idxTicketSel = 0;
-
- protected TipologiaTicket currTipo = TipologiaTicket.ND;
-
- protected StatoRichiesta StatusSel = StatoRichiesta.ND;
-
- protected bool showKey = false;
-
- [Inject]
- protected LiManDataService DataService { get; set; }
-
- #endregion Protected Fields
-
- #region Private Properties
-
- private SubLicenzaModel currRecord
- {
- get
- {
- return _currRecord;
- }
- set
- {
- _currRecord = value;
- }
- }
-
- protected override async Task OnInitializedAsync()
- {
- await ReloadAllData();
- }
-
- private bool isLoading { get; set; } = false;
-
- [Inject]
- private IJSRuntime JSRuntime { get; set; }
-
- #endregion Private Properties
-
- #region Protected Properties
-
- #endregion Protected Properties
-
#region Public Properties
[Parameter]
@@ -98,129 +39,6 @@ namespace LiMan.UI.Components
#endregion Public Properties
- #region Private Methods
-
- private async Task fullReload()
- {
- await DataService.InvalidateAllCache();
- await ReloadAllData();
- }
-
- private async Task ReloadAllData()
- {
- isLoading = true;
- ListActivations = null;
- idxTicketSel = 0;
- await Task.Delay(1);
- ListRecords = MasterLicence.Tickets.ToList();
- isLoading = false;
- }
-
- #endregion Private Methods
-
- #region Protected Methods
-
- protected async void close()
- {
- await DataReset.InvokeAsync(0);
- }
-
- protected async void closeDet()
- {
- await ReloadAllData();
- }
-
- //protected string rowsel = "background:red";
-
- ///
- /// formatta testo secondo scadenza:
- /// scadenza < oggi --> verde
- /// scadenza > oggi --> rosso
- ///
- ///
- ///
- protected string cssScadenza(DateTime scadenza)
- {
- string answ = "text-dark";
- double periodo = scadenza.Subtract(DateTime.Today).TotalDays;
- if (periodo <= 0)
- {
- answ = "text-success";
- }
- else
- {
- answ = "text-danger";
- }
-
- return answ;
- }
-
- protected async Task ResetData()
- {
- await fullReload();
- }
-
- protected void showDecrypt()
- {
- showKey = !showKey;
- }
-
- //protected void showDet(TicketModel currTicket)
- //{
- // // salvo ticket sel
- // idxTicketSel = currTicket.IdxTicket;
- // StatusSel = currTicket.Status;
- // currTipo = currTicket.TType;
- // FileAttached = await LMDService.FileGetFilt(idxTicketSel);
- // // mostro SOLO le attivazioni di cui ho ticket attivi...
- // ListActivations = MasterLicence
- // .Attivazioni
- // .Where(a => a.IdxSubLic == currTicket.IdxSubLic)
- // .ToList();
- //}
-
- protected async Task showDet(TicketModel currTicket)
- {
- // salvo ticket sel
- idxTicketSel = currTicket.IdxTicket;
- StatusSel = currTicket.Status;
- currTipo = currTicket.TType;
- FileAttached = await DataService.FileGetFilt(idxTicketSel);
- //rowsel = "background-color:red";
- // mostro SOLO le attivazioni di cui ho ticket attivi...
- ListActivations = MasterLicence
- .Attivazioni
- .Where(a => a.IdxSubLic == currTicket.IdxSubLic)
- .ToList();
- }
-
- protected async Task UnLock(SubLicenzaModel selRecord)
- {
- if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler eliminare il blocco? la data di scadenza verrà impostata a ieri liberando la licenza per cancellazioni o rimozioni."))
- return;
-
- // chiamo procedura sblocco...
- await DataService.AttivazioneUnlock(selRecord.IdxSubLic);
- await DataUpdated.InvokeAsync(0);
- }
-
- protected async void updateStato(StatoRichiesta nuovoStato)
- {
- if (nuovoStato == StatoRichiesta.Approvata || nuovoStato == StatoRichiesta.Rifiutata)
- {
- if (!await JSRuntime.InvokeAsync("confirm", "Confermi l'azione richiesta? Ricorda che in caso di approvazione/rifiuto va modificato preventivamente il record dell'Attivazione coinvolta."))
- return;
- }
- if (idxTicketSel > 0)
- {
- // salvo presa in carico ticket
- await DataService.TicketUpdateState(idxTicketSel, nuovoStato);
- await DataUpdated.InvokeAsync(0);
- }
- }
-
- #endregion Protected Methods
-
#region Public Methods
public string checkSelect(int IdxSubLic)
@@ -266,5 +84,178 @@ namespace LiMan.UI.Components
}
#endregion Public Methods
+
+ #region Protected Fields
+
+ protected SubLicenzaModel _currRecord = new SubLicenzaModel();
+ protected LicenzaModel _masterLic = new LicenzaModel();
+ protected TipologiaTicket currTipo = TipologiaTicket.ND;
+ protected int idxTicketSel = 0;
+ protected bool showKey = false;
+ protected StatoRichiesta StatusSel = StatoRichiesta.ND;
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ [Inject]
+ protected LiManDataService DataService { get; set; }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected async void close()
+ {
+ await DataReset.InvokeAsync(0);
+ }
+
+ protected async void closeDet()
+ {
+ await ReloadAllData();
+ }
+
+ ///
+ /// formatta testo secondo scadenza:
+ /// scadenza < oggi --> verde
+ /// scadenza > oggi --> rosso
+ ///
+ ///
+ ///
+ protected string cssScadenza(DateTime scadenza)
+ {
+ string answ = "text-dark";
+ double periodo = scadenza.Subtract(DateTime.Today).TotalDays;
+ if (periodo <= 0)
+ {
+ answ = "text-success";
+ }
+ else
+ {
+ answ = "text-danger";
+ }
+
+ return answ;
+ }
+
+ protected override async Task OnInitializedAsync()
+ {
+ await ReloadAllData();
+ }
+
+ //protected string rowsel = "background:red";
+ protected async Task ResetData()
+ {
+ await FullReload();
+ }
+
+ protected void showDecrypt()
+ {
+ showKey = !showKey;
+ }
+
+ protected async Task showDet(TicketModel currTicket)
+ {
+ // salvo ticket sel
+ idxTicketSel = currTicket.IdxTicket;
+ StatusSel = currTicket.Status;
+ currTipo = currTicket.TType;
+ FileAttached = await DataService.FileGetFilt(idxTicketSel);
+ //rowsel = "background-color:red";
+ // mostro SOLO le attivazioni di cui ho ticket attivi...
+ ListActivations = MasterLicence
+ .Attivazioni
+ .Where(a => a.IdxSubLic == currTicket.IdxSubLic)
+ .ToList();
+ }
+
+ //protected void showDet(TicketModel currTicket)
+ //{
+ // // salvo ticket sel
+ // idxTicketSel = currTicket.IdxTicket;
+ // StatusSel = currTicket.Status;
+ // currTipo = currTicket.TType;
+ // FileAttached = await LMDService.FileGetFilt(idxTicketSel);
+ // // mostro SOLO le attivazioni di cui ho ticket attivi...
+ // ListActivations = MasterLicence
+ // .Attivazioni
+ // .Where(a => a.IdxSubLic == currTicket.IdxSubLic)
+ // .ToList();
+ //}
+ protected async Task UnLock(SubLicenzaModel selRecord)
+ {
+ if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler eliminare il blocco? la data di scadenza verrà impostata a ieri liberando la licenza per cancellazioni o rimozioni."))
+ return;
+
+ // chiamo procedura sblocco...
+ await DataService.AttivazioneUnlock(selRecord.IdxSubLic);
+ await DataUpdated.InvokeAsync(0);
+ }
+
+ protected async void updateStato(StatoRichiesta nuovoStato)
+ {
+ if (nuovoStato == StatoRichiesta.Approvata || nuovoStato == StatoRichiesta.Rifiutata)
+ {
+ if (!await JSRuntime.InvokeAsync("confirm", "Confermi l'azione richiesta? Ricorda che in caso di approvazione/rifiuto va modificato preventivamente il record dell'Attivazione coinvolta."))
+ return;
+ }
+ if (idxTicketSel > 0)
+ {
+ // salvo presa in carico ticket
+ await DataService.TicketUpdateState(idxTicketSel, nuovoStato);
+ await DataUpdated.InvokeAsync(0);
+ }
+ }
+
+ #endregion Protected Methods
+
+ #region Private Fields
+
+ private List FileAttached;
+ private List ListActivations;
+ private List ListRecords;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private SubLicenzaModel currRecord
+ {
+ get
+ {
+ return _currRecord;
+ }
+ set
+ {
+ _currRecord = value;
+ }
+ }
+
+ private bool isLoading { get; set; } = false;
+
+ [Inject]
+ private IJSRuntime JSRuntime { get; set; }
+
+ #endregion Private Properties
+
+ #region Private Methods
+
+ private async Task FullReload()
+ {
+ await DataService.FlushRedisCache();
+ await ReloadAllData();
+ }
+
+ private async Task ReloadAllData()
+ {
+ isLoading = true;
+ ListActivations = null;
+ idxTicketSel = 0;
+ await Task.Delay(1);
+ ListRecords = MasterLicence.Tickets.ToList();
+ isLoading = false;
+ }
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Data/LiManDataService.cs b/LiMan.UI/Data/LiManDataService.cs
index c791347..5a97d60 100644
--- a/LiMan.UI/Data/LiManDataService.cs
+++ b/LiMan.UI/Data/LiManDataService.cs
@@ -39,11 +39,8 @@ namespace LiMan.UI.Data
#region Public Constructors
- public LiManDataService(IConfiguration configuration, IMemoryCache memoryCache, IDistributedCache distributedCache, IConnectionMultiplexer redisConnMult, IEmailSender emailSender) : base(configuration, redisConnMult, emailSender)
+ public LiManDataService(IConfiguration configuration, IConnectionMultiplexer redisConnMult, IEmailSender emailSender) : base(configuration, redisConnMult, emailSender)
{
- // conf cache
- this.memoryCache = memoryCache;
- this.distributedCache = distributedCache;
// conf DB
string connStrGLS = _configuration.GetConnectionString("LiMan.GLS");
if (string.IsNullOrEmpty(connStrGLS))
@@ -110,7 +107,6 @@ namespace LiMan.UI.Data
try
{
done = dbControllerGLS.UpdateApplicazioni(currItem);
- await InvalidateAllCache();
await FlushRedisCache();
}
catch (Exception exc)
@@ -167,7 +163,6 @@ namespace LiMan.UI.Data
if (!hasCHild)
{
done = dbControllerNext.ApplicazioniNextDelete(currItem);
- await InvalidateAllCache();
await FlushRedisCache();
}
}
@@ -227,7 +222,6 @@ namespace LiMan.UI.Data
try
{
done = dbControllerNext.ApplicazioniNextUpdate(currItem);
- await InvalidateAllCache();
await FlushRedisCache();
}
catch (Exception exc)
@@ -367,7 +361,6 @@ namespace LiMan.UI.Data
try
{
done = dbControllerGLS.UpdateInstallazioni(currItem);
- await InvalidateAllCache();
await FlushRedisCache();
}
catch (Exception exc)
@@ -451,7 +444,6 @@ namespace LiMan.UI.Data
try
{
done = dbControllerNext.UpsertInstallazione(currItem);
- await InvalidateAllCache();
await FlushRedisCache();
}
catch (Exception exc)
@@ -513,23 +505,6 @@ namespace LiMan.UI.Data
return dbResult;
}
- ///
- /// invalida tutta la cache in caso di update
- ///
- ///
- public async Task InvalidateAllCache()
- {
- await distributedCache.RemoveAsync(mHash("GLS:Applicazioni"));
- await distributedCache.RemoveAsync(mHash("Next:Applicazioni"));
- await distributedCache.RemoveAsync(mHash("GLS:Installazioni"));
- await distributedCache.RemoveAsync(mHash("Next:Installazioni"));
- await distributedCache.RemoveAsync(mHash("GLS:Licenze"));
- await distributedCache.RemoveAsync(mHash("Next:Licenze"));
- //await distributedCache.RemoveAsync(mHash("SUPPL:List"));
- //await distributedCache.RemoveAsync(mHash("TRANSP:List"));
- //await distributedCache.RemoveAsync(mHash("WEEKPLAN:List"));
- }
-
///
/// Trasferisce una licenza da GLS a Next come LOG di una licenza scaduta
///
@@ -809,7 +784,6 @@ namespace LiMan.UI.Data
try
{
done = dbControllerNext.UpsertLicenza(currItem);
- await InvalidateAllCache();
await FlushRedisCache();
}
catch (Exception exc)
@@ -830,7 +804,6 @@ namespace LiMan.UI.Data
try
{
done = await dbControllerNext.ReleaseUpsert(currItem);
- await InvalidateAllCache();
await FlushRedisCache();
}
catch (Exception exc)
@@ -1057,45 +1030,5 @@ namespace LiMan.UI.Data
}
#endregion Protected Methods
-
- #region Private Fields
-
- private readonly IDistributedCache distributedCache;
- private readonly IMemoryCache memoryCache;
-
- ///
- /// Durata assoluta massima della cache IN SECONDI
- ///
- private int chAbsExp = 60 * 5;
-
- ///
- /// Durata della cache IN SECONDI in modalità inattiva (non acceduta) prima di venire
- /// rimossa NON estende oltre il tempo massimo di validità della cache (chAbsExp)
- ///
- private int chSliExp = 60 * 1;
-
- #endregion Private Fields
-
- #region Private Methods
-
- ///
- /// Hash Redis contenente i dati MP di una specifico TYPE (es StatusMacchina,
- /// StateMachineIngressi, ...)
- ///
- ///
- ///
- private static string mHash(string dataType)
- {
- return $"DATA:{dataType}";
- }
-
- private DistributedCacheEntryOptions cacheOpt(bool fastCache)
- {
- var numSecAbsExp = fastCache ? chAbsExp : chAbsExp * 10;
- var numSecSliExp = fastCache ? chSliExp : chSliExp * 10;
- return new DistributedCacheEntryOptions().SetAbsoluteExpiration(DateTime.Now.AddSeconds(numSecAbsExp)).SetSlidingExpiration(TimeSpan.FromSeconds(numSecSliExp));
- }
-
- #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj
index d009c81..9ca9651 100644
--- a/LiMan.UI/LiMan.UI.csproj
+++ b/LiMan.UI/LiMan.UI.csproj
@@ -2,7 +2,7 @@
net6.0
- 2.1.2501.2909
+ 2.1.2501.2910
LiMan.UI
LiMan.UI
@@ -43,8 +43,8 @@
-
-
+
+
@@ -52,7 +52,6 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/LiMan.UI/Pages/Reset.razor.cs b/LiMan.UI/Pages/Reset.razor.cs
index 941f2c5..db49d07 100644
--- a/LiMan.UI/Pages/Reset.razor.cs
+++ b/LiMan.UI/Pages/Reset.razor.cs
@@ -18,13 +18,13 @@ namespace LiMan.UI.Pages
[Inject]
protected MessageService MServ { get; set; } = null!;
+
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
- await DataService.InvalidateAllCache();
await DataService.FlushRedisCache();
await CCService.FlushRedisCache();
await MServ.FlushRedisCache();
diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html
index 2a88e01..30894b2 100644
--- a/LiMan.UI/Resources/ChangeLog.html
+++ b/LiMan.UI/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 2.1.2501.2909
+ Versione: 2.1.2501.2910
Note di rilascio:
-
diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt
index 2d9c15f..83dfcaa 100644
--- a/LiMan.UI/Resources/VersNum.txt
+++ b/LiMan.UI/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2501.2909
+2.1.2501.2910
diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml
index 2914bb0..dba703e 100644
--- a/LiMan.UI/Resources/manifest.xml
+++ b/LiMan.UI/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2501.2909
+ 2.1.2501.2910
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.UI/Startup.cs b/LiMan.UI/Startup.cs
index a2e8522..d125608 100644
--- a/LiMan.UI/Startup.cs
+++ b/LiMan.UI/Startup.cs
@@ -139,12 +139,14 @@ namespace LiMan.UI
o.SlidingExpiration = true;
});
+#if false
services.AddStackExchangeRedisCache(options =>
- {
- //options.Configuration = "localhost:6379";
- options.ConfigurationOptions = new StackExchange.Redis.ConfigurationOptions() { KeepAlive = 180, DefaultDatabase = 5, EndPoints = { { "localhost", 6379 } } };
- options.InstanceName = "LiMan";
- });
+ {
+ //options.Configuration = "localhost:6379";
+ options.ConfigurationOptions = new StackExchange.Redis.ConfigurationOptions() { KeepAlive = 180, DefaultDatabase = 5, EndPoints = { { "localhost", 6379 } } };
+ options.InstanceName = "LiMan";
+ });
+#endif
// REDIS setup
var redisConnString = Configuration.GetConnectionString("Redis");