@@ -29,11 +27,11 @@
-
<%: traduci ("MakeCncProg") %>
+
<%: traduci ("MakeCncProg") %>
+
<%: traduci ("StopCncReq") %>
- <%--
PRINT LABELS--%>
- <%--
ITEM DONE--%>
+
<%: traduci ("ItemDone") %>
diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs
index 45d5931..47d19ac 100644
--- a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs
@@ -63,6 +63,28 @@ namespace NKC_WF.WebUserControls
frmView.DataBind();
raiseEvent();
}
+ protected void lbtStopCnc_Click(object sender, EventArgs e)
+ {
+ bool allOk = true;
+ // invio tramite redis...
+ try
+ {
+ // invio chiusura richiesta
+ ComLib.resetBatchReq();
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog($"Eccezione in tentativo chiusura richiesta CNC da ordine offline{Environment.NewLine}{exc}");
+ }
+
+ if (allOk)
+ {
+ // registro che riporto a 0!
+ DataLayer.man.taOffOL.updateStatus(OffOrdId, 0);
+ }
+ frmView.DataBind();
+ raiseEvent();
+ }
protected void lbtPrintLabels_Click(object sender, EventArgs e)
{
@@ -94,5 +116,22 @@ namespace NKC_WF.WebUserControls
raiseReset();
}
+ ///
+ /// verifica possibilità avvio TASK x presenza task NON chiusi
+ ///
+ ///
+ 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;
+ }
+
}
}
\ No newline at end of file