fix gestione calcolo possibilità nesting x caching redis

This commit is contained in:
Samuele E. Locatelli
2020-08-19 13:06:41 +02:00
parent 614070b729
commit dfd8094d98
5 changed files with 53 additions and 26 deletions
@@ -83,7 +83,7 @@ namespace NKC_WF.WebUserControls
DataLayer.man.taOffOL.updateStatus(OffOrdId, 0);
}
frmView.DataBind();
raiseEvent();
raiseEvent();
}
protected void lbtPrintLabels_Click(object sender, EventArgs e)
@@ -120,17 +120,12 @@ namespace NKC_WF.WebUserControls
/// verifica possibilità avvio TASK x presenza task NON chiusi
/// </summary>
/// <returns></returns>
public bool canStartNew()
public bool canStartNew
{
bool answ = false;
// in primis controllo SE ci siano task running, nel qual caso è false e basta...
int numEst = DataLayer.man.taBL.getByStatus((int)BatchStatus.EstimationRequested, "", 0).Count;
int numNest = DataLayer.man.taBL.getByStatus((int)BatchStatus.NestRequested, "", 0).Count;
// ora controllo anche offline orders...
int numOffOrd = DataLayer.man.taOffOL.getRunning().Count;
// ora la somma di tutti DEVE essere zero...
answ = ((numEst + numNest + numOffOrd) == 0);
return answ;
get
{
return ComLib.canStartNew;
}
}
}