diff --git a/GPW.CORE.UI/GPW.CORE.UI.csproj b/GPW.CORE.UI/GPW.CORE.UI.csproj
index 4dd64a3..a3fc802 100644
--- a/GPW.CORE.UI/GPW.CORE.UI.csproj
+++ b/GPW.CORE.UI/GPW.CORE.UI.csproj
@@ -2,7 +2,7 @@
net6.0
- 3.0.2201.1309
+ 3.0.2201.1315
enable
enable
diff --git a/GPW_Admin/BaseUserControl.cs b/GPW_Admin/BaseUserControl.cs
index 76e2732..9a01361 100644
--- a/GPW_Admin/BaseUserControl.cs
+++ b/GPW_Admin/BaseUserControl.cs
@@ -208,7 +208,17 @@ namespace GPW_Admin
public bool toBool(object valore)
{
bool answ = false;
- bool.TryParse($"{valore}", out answ);
+ string strVal = $"{valore}";
+ // se è lungh 1 (0/1) converto 0=false, 1 = true...
+ if (strVal.Length == 1)
+ {
+ answ = strVal == "1" ? true : false;
+ }
+ else
+ {
+ // se è un valore testuale --> converisone boolean
+ bool.TryParse($"{valore}", out answ);
+ }
return answ;
}
diff --git a/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs b/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs
index a06da8d..c6052cd 100644
--- a/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs
+++ b/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs
@@ -230,15 +230,34 @@ namespace GPW_Admin.WebUserControls
// solo se ha diritti scrittura controllo
if (idxObj != null)
{
- int trovati = 0;
int idxCli = 0;
- _ = int.TryParse(idxObj.ToString(), out idxCli);
- trovati = DataProxy.DP.taAP.getByIdxCli(idxCli, true, true).Rows.Count;
- // controllo se ci sono record correlati...
- if (trovati > 0)
- {
- answ = false;
- }
+ _ = int.TryParse($"{idxObj}", out idxCli);
+ answ = !hasChildObj(idxCli);
+ }
+ return answ;
+ }
+
+
+ ///
+ /// Determina se abbia child obj --> NON eliminabile
+ ///
+ ///
+ ///
+ public bool hasChildObj(int idxCli)
+ {
+ bool answ = false;
+ string redKey = memLayer.ML.redHash($"clienteHasChildObj:{idxCli}");
+ // cerco inc ache redis...
+ string rawData = memLayer.ML.getRSV(redKey);
+ if (rawData == null)
+ {
+ int trovati = DataProxy.DP.taAP.getByIdxCli(idxCli, true, false).Rows.Count;
+ answ = (trovati > 0);
+ memLayer.ML.setRSV(redKey, $"{answ}", 60 * 5);
+ }
+ else
+ {
+ bool.TryParse(rawData, out answ);
}
return answ;
}
diff --git a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs
index 3eb80ba..8a3ec60 100644
--- a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs
+++ b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs
@@ -105,7 +105,7 @@ namespace GPW_Admin.WebUserControls
int.TryParse($"{idxDip}", out IdxDip);
if (IdxDip > 0)
{
- var localUserList = DataProxy.DP.taDipendenti.getAttivi(false);
+ var localUserList = licenzeGPW.getDipAttivi();
// cerco!
var currUser = localUserList.Where(x => x.idxDipendente == IdxDip).FirstOrDefault();
@@ -136,7 +136,7 @@ namespace GPW_Admin.WebUserControls
int.TryParse($"{idxDip}", out IdxDip);
if (IdxDip > 0)
{
- var localUserList = DataProxy.DP.taDipendenti.getAttivi(false);
+ var localUserList = licenzeGPW.getDipAttivi();
// cerco!
var currUser = localUserList.Where(x => x.idxDipendente == IdxDip).FirstOrDefault();
@@ -313,7 +313,7 @@ namespace GPW_Admin.WebUserControls
if (numLicenzeOnline == numLicenze && attivazioniOnline != utentiAttivi)
{
// ciclo tutti gli utenti attivi
- var localUserList = DataProxy.DP.taDipendenti.getAttivi(false);
+ var localUserList = licenzeGPW.getDipAttivi();
// verifico SE sia disponibile licenza...
var activationsList = licenzeGPW.ListaAttivazioni;
Dictionary CodList = new Dictionary();
@@ -411,14 +411,14 @@ namespace GPW_Admin.WebUserControls
{
isTicketReq = false;
showTickets=false;
- fullRefresh();
+ //fullRefresh();
}
fixVisibility();
}
///
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
- /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
+ /// questi devono essere opportunamente nominati (es: txt{0}, dl{0}, ...)
///
///
///
diff --git a/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs b/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs
index 2f3610c..f242622 100644
--- a/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs
+++ b/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs
@@ -557,18 +557,25 @@ namespace GPW_Admin.WebUserControls
public bool hasChildObj(int idxFase)
{
bool answ = false;
- string redKey = memLayer.ML.redHash($"faseHasChildObj:{idxFase}");
- // cerco inc ache redis...
- string rawData = memLayer.ML.getRSV(redKey);
- if (rawData == null)
+ if (idxFase > 0)
{
- int trovati = DataProxy.DP.taRA.getByFase(this.idxFase).Count;
- answ = (trovati > 0);
- memLayer.ML.setRSV(redKey, $"{answ}", 60 * 5);
+ string redKey = memLayer.ML.redHash($"faseHasChildObj:{idxFase}");
+ // cerco inc ache redis...
+ string rawData = memLayer.ML.getRSV(redKey);
+ if (rawData == null)
+ {
+ int trovati = DataProxy.DP.taRA.getByFase(this.idxFase).Count;
+ answ = (trovati > 0);
+ memLayer.ML.setRSV(redKey, $"{answ}", 60 * 5);
+ }
+ else
+ {
+ bool.TryParse(rawData, out answ);
+ }
}
else
{
- bool.TryParse(rawData, out answ);
+ answ = true;
}
return answ;
}
diff --git a/GPW_Data/licenzeGPW.cs b/GPW_Data/licenzeGPW.cs
index 3d34896..a068e11 100644
--- a/GPW_Data/licenzeGPW.cs
+++ b/GPW_Data/licenzeGPW.cs
@@ -643,10 +643,17 @@ namespace GPW_data
private static bool _checkLicenze()
{
bool answ = false;
+ bool fatto = false;
try
{
- // effettua refresh attivazioni...
- var fatto = RefreshActInfo().Result;
+ // cerco da cache
+ string rawData = memLayer.ML.getRSV(rkeyActInfo);
+ // se non ci fosse --> refresh online!
+ if (string.IsNullOrEmpty(rawData))
+ {
+ // effettua refresh attivazioni...
+ fatto = RefreshActInfo().Result;
+ }
answ = utentiAttivi <= licenzeAttive;
if (!answ && memLayer.ML.confReadInt("_logLevel") > 5)
{
@@ -786,7 +793,7 @@ namespace GPW_data
List answ = new List();
// cerco da cache
string rawData = memLayer.ML.getRSV(rkeyActInfo);
- // se no ci fosse --> refresh online!
+ // se non ci fosse --> refresh online!
if (string.IsNullOrEmpty(rawData))
{
var fatto = RefreshActInfo().Result;
@@ -884,7 +891,7 @@ namespace GPW_data
return getDipAttivi().Count;
}
- private static DS_Applicazione.DipendentiDataTable getDipAttivi()
+ public static DS_Applicazione.DipendentiDataTable getDipAttivi()
{
DS_Applicazione.DipendentiDataTable answ = new DS_Applicazione.DipendentiDataTable();
// cerco da cache
@@ -996,7 +1003,7 @@ namespace GPW_data
// deserializzo
answ = JsonConvert.DeserializeObject>(rawData);
// salvo in redis per TTL std
- memLayer.ML.setRSV(rkeyTickets, rawData, 10);
+ memLayer.ML.setRSV(rkeyTickets, rawData, 20);
}
}
return await Task.FromResult(answ);
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index a7902a5..cbd9c3b 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
GPW - Gestione Presenze Web
- Versione: 3.0.2201.1309
+ Versione: 3.0.2201.1315
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 2156188..0353443 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-3.0.2201.1309
+3.0.2201.1315
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 6e614df..aaa0cdc 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 3.0.2201.1309
+ 3.0.2201.1315
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html
false