Update x calcolo con ordine singolo + fix cancellazione a cascata
This commit is contained in:
@@ -121,40 +121,6 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
// effettuo VERA ri-assegnazione ordini/kit a nuovi batch
|
||||
DLMan.taOLT.setBatchSplit(BatchId, true);
|
||||
|
||||
#if false
|
||||
// invio il PRIMO batch descendant
|
||||
var tabDesc = ComLib.BatchDescendant(BatchId);
|
||||
if (tabDesc != null && tabDesc.Count > 0)
|
||||
{
|
||||
bool batchSent = false;
|
||||
// ciclo fino a trovare un batch VALIDO (= contiene ordini)
|
||||
foreach (var item in tabDesc)
|
||||
{
|
||||
// 2021.07.19 FIX x caso batch vuoto: se non ho pezzi --> approvo direttamente e passo al successivo...
|
||||
var tabItems = DLMan.taIL.getByBatch(item.BatchID);
|
||||
if (tabItems != null)
|
||||
{
|
||||
//--> approvo direttamente e passo al successivo...
|
||||
if (tabItems.Count == 0)
|
||||
{
|
||||
// registro su DB batch DISCARDED (NON HA PEZZI...)
|
||||
DLMan.taBL.updateStatus(item.BatchID, (int)BatchStatus.Discarded, "", -1);
|
||||
}
|
||||
// --> invio batch
|
||||
else
|
||||
{
|
||||
ComLib.sendBatchReq(item.BatchID, "Nesting", 2, false);
|
||||
// registro su DB nesting iniziato...
|
||||
DLMan.taBL.updateStatus(item.BatchID, (int)BatchStatus.NestRequested, "", -1);
|
||||
batchSent = true;
|
||||
}
|
||||
}
|
||||
if (batchSent)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
bool fatto = ComLib.checkSendBatchSplit(BatchId);
|
||||
}
|
||||
else
|
||||
@@ -174,6 +140,17 @@ namespace NKC_WF.WebUserControls
|
||||
ComLib.resetBatchReq();
|
||||
// registro su DB nesting iniziato...
|
||||
DLMan.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, "", -1);
|
||||
if (BatchIsAncestor)
|
||||
{
|
||||
var tabDesc = ComLib.BatchDescendant(BatchId);
|
||||
if (tabDesc != null && tabDesc.Count > 0)
|
||||
{
|
||||
foreach (var item in tabDesc)
|
||||
{
|
||||
DLMan.taBL.updateStatus(item.BatchID, (int)BatchStatus.Imported, "", -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
|
||||
@@ -188,8 +188,12 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
// ordino le medie
|
||||
workRatio.Sort();
|
||||
// elimino le + basse quanti materiali ci sono...
|
||||
workRatio.RemoveRange(0, materialsList.Count);
|
||||
// controllo di averne + di 1...
|
||||
if (workRatio.Count > materialsList.Count * 2)
|
||||
{
|
||||
// elimino le + basse quanti materiali ci sono...
|
||||
workRatio.RemoveRange(0, materialsList.Count);
|
||||
}
|
||||
double avgRatio = workRatio.Average();
|
||||
double minRatio = workRatio.Min();
|
||||
double maxRatio = workRatio.Max();
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-4 text-right">
|
||||
<asp:HyperLink runat="server" ID="hlShowErr" NavigateUrl='<%# $"../site/ErrorsLog?PUID=B.{Eval("BatchID")}" %>' CssClass="text-warning" Visible='<%# Eval("NumErrPre").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErrPre")} err)" %></asp:HyperLink>
|
||||
<asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# $"../site/ErrorsLog?PUID={Eval("EnvNum")}" %>' CssClass="text-danger" Visible='<%# Eval("NumErr").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErr")} err)" %></asp:HyperLink>
|
||||
<asp:HyperLink runat="server" ID="hlShowErr01" NavigateUrl='<%# $"../site/ErrorsLog?PUID=B.{Eval("BatchID")}" %>' CssClass="text-warning" Visible='<%# Eval("NumErrPre").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErrPre")} err)" %></asp:HyperLink>
|
||||
<asp:HyperLink runat="server" ID="hlShowErr02" NavigateUrl='<%# $"../site/ErrorsLog?PUID={Eval("EnvNum")}" %>' CssClass="text-danger" Visible='<%# Eval("NumErr").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErr")} err)" %></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-8 text-left">
|
||||
<div class="d-flex">
|
||||
|
||||
Reference in New Issue
Block a user