From ac5c8b3880f689f48bfbf76ee06bed152ccaa7b2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 3 Oct 2024 10:04:19 +0200 Subject: [PATCH] ADM: - Update gestione spostamento fasi con stored clona/sposta - gestione abilitazione rapida azioni da stato sel - ottimizzazione meccanismo preselezione cli/proj --- GPW.CORE.ADM/Components/Compo/FasiMan.razor | 24 +- .../Components/Compo/FasiMan.razor.cs | 87 +++++- .../Components/Compo/SpostaFasiMan.razor | 61 +++- .../Components/Compo/SpostaFasiMan.razor.cs | 100 +++++- GPW.CORE.ADM/GPW.CORE.ADM.csproj | 2 +- GPW.CORE.Data/Controllers/GPWController.cs | 123 +++++++- GPW.CORE.Data/Services/GpwDataService.cs | 288 ++++++++++++------ Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 10 files changed, 556 insertions(+), 135 deletions(-) diff --git a/GPW.CORE.ADM/Components/Compo/FasiMan.razor b/GPW.CORE.ADM/Components/Compo/FasiMan.razor index baaaf7f..b1d7440 100644 --- a/GPW.CORE.ADM/Components/Compo/FasiMan.razor +++ b/GPW.CORE.ADM/Components/Compo/FasiMan.razor @@ -15,16 +15,22 @@ }
-
+
@if (CanSelProj) { + @if (!string.IsNullOrEmpty(Title)) + { +
+

@Title

+
+ }
C - @foreach (var item in ListClienti) { @@ -37,7 +43,7 @@
P - @foreach (var item in ListProgetti) { @@ -113,12 +119,12 @@ { + @if (ShowSelect) + { + + } @if (RecordSel == null) { - @if (ShowSelect) - { - - } @if (!CanSelProj) { @@ -126,10 +132,6 @@ } else { - @if (ShowSelect) - { - - } @if (!CanSelProj) { diff --git a/GPW.CORE.ADM/Components/Compo/FasiMan.razor.cs b/GPW.CORE.ADM/Components/Compo/FasiMan.razor.cs index 704391e..5792ca9 100644 --- a/GPW.CORE.ADM/Components/Compo/FasiMan.razor.cs +++ b/GPW.CORE.ADM/Components/Compo/FasiMan.razor.cs @@ -18,12 +18,21 @@ namespace GPW.CORE.ADM.Components.Compo [Parameter] public bool ChkLicOk { get; set; } = true; + [Parameter] + public EventCallback EC_FaseSel { get; set; } + + [Parameter] + public EventCallback EC_ProjSel { get; set; } + [Parameter] public EventCallback EC_update { get; set; } [Parameter] public bool EnableAddFasi { get; set; } = true; + [Parameter] + public string HeadCss { get; set; } = ""; + [Parameter] public List? ListRecords { @@ -37,6 +46,9 @@ namespace GPW.CORE.ADM.Components.Compo [Parameter] public bool ShowSelect { get; set; } = true; + [Parameter] + public string Title { get; set; } = ""; + #endregion Public Properties #region Protected Properties @@ -47,6 +59,30 @@ namespace GPW.CORE.ADM.Components.Compo [Inject] protected GpwDataService GDataServ { get; set; } = null!; + protected int IdxCli + { + get => idxCli; + set + { + if (idxCli != value) + { + idxCli = value; + } + } + } + + protected int IdxPrj + { + get => idxPrj; + set + { + if (idxPrj != value) + { + idxPrj = value; + } + } + } + [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; @@ -145,16 +181,18 @@ namespace GPW.CORE.ADM.Components.Compo } } - protected void DoSelect(AnagFasiExplModel? selItem) + protected async Task DoSelect(AnagFasiExplModel? selItem) { RecordSel = selItem; RecordEdit = null; + await EC_FaseSel.InvokeAsync(selItem); } protected async Task ForceReload() { RecordEdit = null; RecordSel = null; + await EC_FaseSel.InvokeAsync(null); await EC_update.InvokeAsync(true); await Task.Delay(1); isLoading = false; @@ -164,7 +202,7 @@ namespace GPW.CORE.ADM.Components.Compo /// init valori da config /// /// - protected async Task initConf() + protected async Task InitConf() { // leggo conf standard controllo RegAtt var sWarningRatioPerc = await GDataServ.ConfigGetKey("WarningRatioPerc"); @@ -176,7 +214,8 @@ namespace GPW.CORE.ADM.Components.Compo protected override async Task OnInitializedAsync() { - await initConf(); + await InitConf(); + await ReloadSel(); await ReloadData(); } @@ -185,6 +224,21 @@ namespace GPW.CORE.ADM.Components.Compo await ReloadData(); } + /// + /// Tentativo rilettura selezione se possibile.. + /// + /// + protected async Task ReloadSel() + { + // verifico di essere in modalità con selezione permessa x preselezione + if (CanSelProj) + { + IdxCli = await AppMServ.UserPrefGet($"FasiMan_{Title}_idxCli"); + IdxPrj = await AppMServ.UserPrefGet($"FasiMan_{Title}_idxPrj"); + await EC_ProjSel.InvokeAsync(IdxPrj); + } + } + #endregion Protected Methods #region Private Fields @@ -280,28 +334,43 @@ namespace GPW.CORE.ADM.Components.Compo ListClienti = ListClienti.Where(x => x.Attivo).ToList(); } // seleziono proj da client - if (idxCli > 0) + if (IdxCli > 0) { - ListProgetti = await GDataServ.AnagProjByCli(idxCli); + ListProgetti = await GDataServ.AnagProjByCli(IdxCli); if (ShowOnlyActive) { ListProgetti = ListProgetti.Where(x => x.Attivo ?? false).ToList(); } } // se abilitato x rilettura locale --> leggo fasi! - if (CanSelProj && idxCli > 0 && idxPrj > 0) + if (CanSelProj && IdxCli > 0 && IdxPrj > 0) { - listRecords = await GDataServ.AnagFasiExplByProj(idxPrj); + listRecords = await GDataServ.AnagFasiExplByProj(IdxPrj); } } totalCount = listRecords.Count; isLoading = false; } - private async Task ReloadProj() + private async Task SaveCli() { - idxPrj = 0; + IdxPrj = 0; await ReloadData(); + await EC_ProjSel.InvokeAsync(IdxPrj); + await SaveSelection(); + } + + private async Task SaveProj() + { + await ReloadData(); + await EC_ProjSel.InvokeAsync(IdxPrj); + await SaveSelection(); + } + + private async Task SaveSelection() + { + await AppMServ.UserPrefSet($"FasiMan_{Title}_idxCli", $"{IdxCli}"); + await AppMServ.UserPrefSet($"FasiMan_{Title}_idxPrj", $"{IdxPrj}"); } #endregion Private Methods diff --git a/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor b/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor index f1ce2ea..9b0df97 100644 --- a/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor +++ b/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor @@ -3,7 +3,7 @@
-

Spostamento Fasi

+

Spostamento Fasi

@@ -14,13 +14,60 @@
+
+ @if (OkFase) + { +
+ +
+
+ +
+ } + else + { +
+ +
+
+ +
+ } + @if (OkSubFase) + { +
+ +
+
+ +
+ } + else + { +
+ +
+
+ +
+ } +
-
- -
-
- -
+ @if (isLoading) + { +
+ +
+ } + else + { +
+ +
+
+ +
+ }
diff --git a/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor.cs b/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor.cs index b9e8916..c85265d 100644 --- a/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor.cs +++ b/GPW.CORE.ADM/Components/Compo/SpostaFasiMan.razor.cs @@ -1,7 +1,105 @@ +using GPW.CORE.Data.DbModels; +using GPW.CORE.Data.Services; +using Microsoft.AspNetCore.Components; + namespace GPW.CORE.ADM.Components.Compo { public partial class SpostaFasiMan { - protected bool ShowPrjArc = false; + #region Protected Properties + + [Inject] + protected GpwDataService GDataServ { get; set; } = null!; + + protected bool OkFase + { + get => selFaseOrig != null && selFaseOrig.IdxFaseAncest == 0 && selFaseDest == null && selIdxProjDest > 0; + } + + protected bool OkSubFase + { + get => selFaseOrig != null && selFaseOrig.IdxFaseAncest != 0 && selFaseDest != null && selFaseDest.IdxFaseAncest == 0; + } + + #endregion Protected Properties + + #region Protected Methods + + protected async Task ClonaFase() + { + isLoading = true; + if (selFaseOrig != null) + { + await GDataServ.AnagFasiDupFase(selIdxProjDest, selFaseOrig.IdxFase); + } + await Task.Delay(100); + isLoading = false; + } + + protected async Task ClonaSubFase() + { + isLoading = true; + if (selFaseOrig != null && selFaseDest != null) + { + await GDataServ.AnagFasiDupSubFase(selFaseDest.IdxFase, selFaseOrig.IdxFase); + } + await Task.Delay(100); + isLoading = false; + } + + protected void SetFaseDest(AnagFasiExplModel selFase) + { + selFaseDest = selFase; + } + + protected void SetFaseOrig(AnagFasiExplModel selFase) + { + selFaseOrig = selFase; + } + + protected void SetProjDest(int idxProj) + { + selIdxProjDest = idxProj; + } + + protected async Task SpostaFase() + { + isLoading = true; + if (selFaseOrig != null) + { + await GDataServ.AnagFasiMovFase(selIdxProjDest, selFaseOrig.IdxFase); + } + await Task.Delay(100); + isLoading = false; + } + + protected async Task SpostaSubFase() + { + isLoading = true; + if (selFaseOrig != null && selFaseDest != null) + { + await GDataServ.AnagFasiMovSubFase(selFaseDest.IdxFase, selFaseOrig.IdxFase); + } + await Task.Delay(100); + isLoading = false; + } + + #endregion Protected Methods + + #region Private Fields + + private bool isLoading = false; + private bool ShowPrjArc = false; + + #endregion Private Fields + + #region Private Properties + + private AnagFasiExplModel? selFaseDest { get; set; } = null; + private AnagFasiExplModel? selFaseOrig { get; set; } = null; + + private int selIdxProjDest { get; set; } = 0; + + #endregion Private Properties } } \ No newline at end of file diff --git a/GPW.CORE.ADM/GPW.CORE.ADM.csproj b/GPW.CORE.ADM/GPW.CORE.ADM.csproj index e14955b..cf587fa 100644 --- a/GPW.CORE.ADM/GPW.CORE.ADM.csproj +++ b/GPW.CORE.ADM/GPW.CORE.ADM.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 4.1.2410.0209 + 4.1.2410.0310 diff --git a/GPW.CORE.Data/Controllers/GPWController.cs b/GPW.CORE.Data/Controllers/GPWController.cs index 36e049b..aebf4b7 100644 --- a/GPW.CORE.Data/Controllers/GPWController.cs +++ b/GPW.CORE.Data/Controllers/GPWController.cs @@ -427,6 +427,66 @@ namespace GPW.CORE.Data.Controllers return answ; } + /// + /// Esegue stored x DUPLICARE Fase (ancestor) tra progetti + /// + /// + /// + /// + public bool AnagFasiDupFase(int idxProjDest, int idxFaseSrc) + { + bool fatto = false; + // cerco su DB recuperando set di dati.... + using (GPWContext dbCtx = new GPWContext(_configuration)) + { + try + { + var pIdxPrj = new SqlParameter("@idxProgetto", idxProjDest); + var pIdxFase = new SqlParameter("@Original_idxFase", idxFaseSrc); + + var dbResult = dbCtx + .Database + .ExecuteSqlRaw("EXEC stp_AF_clonaFaseAnc @idxProgetto, @Original_idxFase", pIdxPrj, pIdxFase); + fatto = dbResult != 0; + } + catch (Exception exc) + { + Log.Error($"Errore in AnagFasiDupFase:{Environment.NewLine}{exc}"); + } + } + return fatto; + } + + /// + /// Esegue stored x DUPLICARE SottoFase in un altra Fase (ancestor) + /// + /// + /// + /// + public bool AnagFasiDupSubFase(int idxFaseDest, int idxFaseSrc) + { + bool fatto = false; + // cerco su DB recuperando set di dati.... + using (GPWContext dbCtx = new GPWContext(_configuration)) + { + try + { + var pIdxFaseDest = new SqlParameter("@idxFaseAncest", idxFaseDest); + var pIdxFaseSrc = new SqlParameter("@Original_idxFase", idxFaseSrc); + + var dbResult = dbCtx + .Database + .ExecuteSqlRaw("EXEC stp_AF_clonaFase @idxFaseAncest, @Original_idxFase", pIdxFaseDest, pIdxFaseSrc); + fatto = dbResult != 0; + } + catch (Exception exc) + { + Log.Error($"Errore in AnagFasiDupSubFase:{Environment.NewLine}{exc}"); + } + } + return fatto; + } + /// /// Elenco FasiExpl dato chiave progetto /// @@ -485,6 +545,66 @@ namespace GPW.CORE.Data.Controllers return result != 0; } + /// + /// Esegue stored x spostare Fase (ancestor) tra progetti + /// + /// + /// + /// + public bool AnagFasiMovFase(int idxProjDest, int idxFaseSrc) + { + bool fatto = false; + // cerco su DB recuperando set di dati.... + using (GPWContext dbCtx = new GPWContext(_configuration)) + { + try + { + var pIdxPrj = new SqlParameter("@idxProgetto", idxProjDest); + var pIdxFase = new SqlParameter("@Original_idxFase", idxFaseSrc); + + var dbResult = dbCtx + .Database + .ExecuteSqlRaw("EXEC stp_AF_updateProgetto @idxProgetto, @Original_idxFase", pIdxPrj, pIdxFase); + fatto = dbResult != 0; + } + catch (Exception exc) + { + Log.Error($"Errore in AnagFasiMovFase:{Environment.NewLine}{exc}"); + } + } + return fatto; + } + + /// + /// Esegue stored x spostare SottoFase in un altra Fase (ancestor) + /// + /// + /// + /// + public bool AnagFasiMovSubFase(int idxFaseDest, int idxFaseSrc) + { + bool fatto = false; + // cerco su DB recuperando set di dati.... + using (GPWContext dbCtx = new GPWContext(_configuration)) + { + try + { + var pIdxFaseDest = new SqlParameter("@idxFaseAncest", idxFaseDest); + var pIdxFaseSrc = new SqlParameter("@Original_idxFase", idxFaseSrc); + + var dbResult = dbCtx + .Database + .ExecuteSqlRaw("EXEC stp_AF_updateFaseAncest @idxFaseAncest, @Original_idxFase", pIdxFaseDest, pIdxFaseSrc); + fatto = dbResult != 0; + } + catch (Exception exc) + { + Log.Error($"Errore in AnagFasiMovSubFase:{Environment.NewLine}{exc}"); + } + } + return fatto; + } + /// /// Esecuzione upsert fase /// @@ -789,7 +909,6 @@ namespace GPW.CORE.Data.Controllers return dbResult; } - /// /// Recupera elenco record da idx cliente /// @@ -806,7 +925,7 @@ namespace GPW.CORE.Data.Controllers // recupero intero set.... dbResult = dbCtx .DbSetAnagProgetti - .Where(x => x.IdxCliente==idxCliente) + .Where(x => x.IdxCliente == idxCliente) .OrderBy(x => x.NomeProj) .ToList(); } diff --git a/GPW.CORE.Data/Services/GpwDataService.cs b/GPW.CORE.Data/Services/GpwDataService.cs index aab29c8..41fde4a 100644 --- a/GPW.CORE.Data/Services/GpwDataService.cs +++ b/GPW.CORE.Data/Services/GpwDataService.cs @@ -393,6 +393,50 @@ namespace GPW.CORE.Data.Services return answ; } + /// + /// Esegue stored x DUPLICARE Fase (ancestor) tra progetti + /// + /// + /// + /// + public async Task AnagFasiDupFase(int idxProjDest, int idxFaseSrc) + { + bool answ = false; + try + { + answ = dbController.AnagFasiDupFase(idxProjDest, idxFaseSrc); + // invalido la cache... + await ExecFlushRedisPattern($"{redisBaseAddr}:*"); + } + catch (Exception exc) + { + Log.Error($"Eccezione in AnagFasiDupFase{Environment.NewLine}{exc}"); + } + return answ; + } + + /// + /// Esegue stored x DUPLICARE SottoFase in un altra Fase (ancestor) + /// + /// + /// + /// + public async Task AnagFasiDupSubFase(int idxFaseDest, int idxFaseSrc) + { + bool answ = false; + try + { + answ = dbController.AnagFasiDupSubFase(idxFaseDest, idxFaseSrc); + // invalido la cache... + await ExecFlushRedisPattern($"{redisBaseAddr}:*"); + } + catch (Exception exc) + { + Log.Error($"Eccezione in AnagFasiDupSubFase{Environment.NewLine}{exc}"); + } + return answ; + } + /// /// Elenco fasi dato progetto /// @@ -458,6 +502,50 @@ namespace GPW.CORE.Data.Services return answ; } + /// + /// Esegue stored x spostare Fase (ancestor) tra progetti + /// + /// + /// + /// + public async Task AnagFasiMovFase(int idxProjDest, int idxFaseSrc) + { + bool answ = false; + try + { + answ = dbController.AnagFasiMovFase(idxProjDest, idxFaseSrc); + // invalido la cache... + await ExecFlushRedisPattern($"{redisBaseAddr}:*"); + } + catch (Exception exc) + { + Log.Error($"Eccezione in AnagFasiMovFase{Environment.NewLine}{exc}"); + } + return answ; + } + + /// + /// Esegue stored x spostare SottoFase in un altra Fase (ancestor) + /// + /// + /// + /// + public async Task AnagFasiMovSubFase(int idxFaseDest, int idxFaseSrc) + { + bool answ = false; + try + { + answ = dbController.AnagFasiMovSubFase(idxFaseDest, idxFaseSrc); + // invalido la cache... + await ExecFlushRedisPattern($"{redisBaseAddr}:*"); + } + catch (Exception exc) + { + Log.Error($"Eccezione in AnagFasiMovSubFase{Environment.NewLine}{exc}"); + } + return answ; + } + /// /// Aggiornamento record Fasi /// @@ -562,49 +650,6 @@ namespace GPW.CORE.Data.Services return dbResult; } - /// - /// Recupera l'elenco gruppi abilitati x il dipendente - /// - /// - /// - public async Task> AnagGruppiUser(int idxDipendente) - { - string source = "DB"; - List? dbResult = new List(); - string currKey = $"{rKeyGrpUser}:{idxDipendente}"; - Stopwatch stopWatch = new Stopwatch(); - stopWatch.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.AnagGruppiUser(idxDipendente); - rawData = JsonConvert.SerializeObject(dbResult, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); - } - if (dbResult == null) - { - dbResult = new List(); - } - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - Log.Debug($"AnagGruppiUser | {source} in: {ts.TotalMilliseconds} ms"); - return dbResult; - } - - /// /// Eliminazione record Gruppo /// @@ -647,6 +692,47 @@ namespace GPW.CORE.Data.Services return answ; } + /// + /// Recupera l'elenco gruppi abilitati x il dipendente + /// + /// + /// + public async Task> AnagGruppiUser(int idxDipendente) + { + string source = "DB"; + List? dbResult = new List(); + string currKey = $"{rKeyGrpUser}:{idxDipendente}"; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.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.AnagGruppiUser(idxDipendente); + rawData = JsonConvert.SerializeObject(dbResult, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (dbResult == null) + { + dbResult = new List(); + } + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"AnagGruppiUser | {source} in: {ts.TotalMilliseconds} ms"); + return dbResult; + } /// /// Dati orario del dipendente indicato @@ -731,23 +817,6 @@ namespace GPW.CORE.Data.Services return dbResult; } - /// - /// Recupera record da idx richiesto - /// - /// - public AnagProgettiModel AnagProjByKey(int IdxProj) - { - string source = "DB"; - AnagProgettiModel dbResult = new AnagProgettiModel(); - Stopwatch stopWatch = new Stopwatch(); - stopWatch.Start(); - dbResult = dbController.AnagProjByKey(IdxProj); - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - Log.Debug($"AnagProjByKey | {source} in: {ts.TotalMilliseconds} ms"); - return dbResult; - } - /// /// Recupera elenco record da idx cliente /// @@ -789,6 +858,23 @@ namespace GPW.CORE.Data.Services return dbResult; } + /// + /// Recupera record da idx richiesto + /// + /// + public AnagProgettiModel AnagProjByKey(int IdxProj) + { + string source = "DB"; + AnagProgettiModel dbResult = new AnagProgettiModel(); + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + dbResult = dbController.AnagProjByKey(IdxProj); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"AnagProjByKey | {source} in: {ts.TotalMilliseconds} ms"); + return dbResult; + } + /// /// Elenco progetti calcolati con ore avanzamento filtrata /// @@ -1483,47 +1569,6 @@ namespace GPW.CORE.Data.Services return EgwCoreLib.Utils.SteamCrypto.DecryptString(encData, passPhrase); } - /// - /// Elenco dip dato un gruppo (se "" ritorna tutti) - /// - /// - public async Task> DipendentiByGrp(string Gruppo) - { - string source = "DB"; - List? dbResult = new List(); - string currKey = $"{rKeyDipendenti}:ByGrp:{Gruppo}"; - Stopwatch stopWatch = new Stopwatch(); - stopWatch.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.DipendentiByGrp(Gruppo); - rawData = JsonConvert.SerializeObject(dbResult, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); - } - if (dbResult == null) - { - dbResult = new List(); - } - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - Log.Debug($"DipendentiByGrp | {source} in: {ts.TotalMilliseconds} ms"); - return dbResult; - } - /// /// Clona assegnazione gruppi dipendente /// @@ -1590,6 +1635,47 @@ namespace GPW.CORE.Data.Services return answ; } + /// + /// Elenco dip dato un gruppo (se "" ritorna tutti) + /// + /// + public async Task> DipendentiByGrp(string Gruppo) + { + string source = "DB"; + List? dbResult = new List(); + string currKey = $"{rKeyDipendenti}:ByGrp:{Gruppo}"; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.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.DipendentiByGrp(Gruppo); + rawData = JsonConvert.SerializeObject(dbResult, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); + } + if (dbResult == null) + { + dbResult = new List(); + } + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"DipendentiByGrp | {source} in: {ts.TotalMilliseconds} ms"); + return dbResult; + } + public async Task> DipendentiGetAll() { string source = "DB"; diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index fb22f79..8b366ef 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ GPW - Gestione Presenze Web -

Versione: 4.1.2410.0209

+

Versione: 4.1.2410.0310


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index f7b5be8..0041ca6 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -4.1.2410.0209 +4.1.2410.0310 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 530e787..34699b6 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 4.1.2410.0209 + 4.1.2410.0310 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false