fix procedure check licenza singolo user globale
This commit is contained in:
@@ -64,15 +64,7 @@ namespace GPW_data
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// FIXME TODO !!! FARE !!!
|
||||
DS_Applicazione.DipendentiRow rigaDip = DP.taDipendenti.getByIdx(idxDipendente)[0];
|
||||
answ = rigaDip.attivo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
bool answ = licenzeGPW.userPayloadOk(idxDipendente);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
+25
-3
@@ -45,9 +45,7 @@ namespace GPW_data
|
||||
get
|
||||
{
|
||||
Random rndGen = new Random();
|
||||
int minVal = 50;
|
||||
int maxVal = 70;
|
||||
return rndGen.Next(minVal, maxVal) * 60;
|
||||
return rndGen.Next(50, 70) * 60;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -743,6 +741,30 @@ namespace GPW_data
|
||||
return await Task.FromResult(answ);
|
||||
}
|
||||
|
||||
public static bool userPayloadOk(int idxDip)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// recupero riga dip
|
||||
var userTab = DataProxy.DP.taDipendenti.getByIdx(idxDip);
|
||||
if (userTab != null && userTab.Count > 0)
|
||||
{
|
||||
var userRow = userTab[0];
|
||||
// calcolo suo codice...
|
||||
var codImpCurr = DataProxy.DP.hashCodImpiego(userRow);
|
||||
// cerco dip tra elenco json
|
||||
var userLocalList = ListaAttivazioni;
|
||||
var foundRec = userLocalList.Where(x => x.CodImpiego == codImpCurr);
|
||||
answ = foundRec.Count() > 0;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -361,11 +361,11 @@ namespace GPW_data
|
||||
bool answ = false;
|
||||
if (memLayer.ML.confReadBool("enableDailyCheck"))
|
||||
{
|
||||
if (memLayer.ML.confReadInt("_logLevel") > 5) logger.lg.scriviLog("Richiesto Check Daily Duties", tipoLog.INFO);
|
||||
int firstHour2Check = memLayer.ML.confReadInt("firstHour2Check");
|
||||
// controllo sfasato di x ore come da we.config se ci sia già stato il check quotidiano anomalie (con relative email)
|
||||
// controllo sfasato di x ore come da web.config se ci sia già stato il check quotidiano anomalie (con relative email)
|
||||
if (DataProxy.DP.taRE.getByDataEv("checkAnomalie", DateTime.Now.AddHours(-firstHour2Check).Date).Rows.Count == 0)
|
||||
{
|
||||
logger.lg.scriviLog("Richiesto Check Daily Duties", tipoLog.INFO);
|
||||
// chiamo check anomalie
|
||||
checkAnomalie();
|
||||
//registro evento
|
||||
|
||||
Reference in New Issue
Block a user