Fix varix gestione UNLOAD: finalmente OK refresh! (timer fuori updatePnl svg)
This commit is contained in:
+68
-63
@@ -1901,75 +1901,80 @@ namespace AppData
|
||||
// solo se sheet > 0...
|
||||
if (sheetID > 0)
|
||||
{
|
||||
// elenco items da foglio!!!
|
||||
var tabItems = DataLayer.man.taIL.getBySheet(sheetID);
|
||||
List<string> itemsAll = new List<string>();
|
||||
List<string> itemsDepo = new List<string>();
|
||||
List<string> itemsCart = new List<string>();
|
||||
List<string> itemsBin = new List<string>();
|
||||
List<string> itemsSecOp = new List<string>();
|
||||
List<string> itemsScrap = new List<string>();
|
||||
|
||||
//se ho items...
|
||||
if (tabItems.Count > 0)
|
||||
try
|
||||
{
|
||||
// ciclo!
|
||||
foreach (var item in tabItems)
|
||||
// elenco items da foglio!!!
|
||||
var tabItems = DataLayer.man.taIL.getBySheet(sheetID);
|
||||
List<string> itemsAll = new List<string>();
|
||||
List<string> itemsDepo = new List<string>();
|
||||
List<string> itemsCart = new List<string>();
|
||||
List<string> itemsBin = new List<string>();
|
||||
List<string> itemsSecOp = new List<string>();
|
||||
List<string> itemsScrap = new List<string>();
|
||||
|
||||
//se ho items...
|
||||
if (tabItems.Count > 0)
|
||||
{
|
||||
// aggiungoncomunque a lista generale...
|
||||
itemsAll.Add(item.ItemDtmx);
|
||||
// controllo se sia SCRAP
|
||||
if (item.StatusID >= 990)
|
||||
// ciclo!
|
||||
foreach (var item in tabItems)
|
||||
{
|
||||
itemsScrap.Add(item.ItemDtmx);
|
||||
}
|
||||
// controllo SE sia stato depositato... check status 3/4
|
||||
else if (item.StatusID == 3 || item.StatusID == 4)
|
||||
{
|
||||
itemsDepo.Add(item.ItemDtmx);
|
||||
}
|
||||
else if (item.ProcessesReq.Contains("PaintFlag"))
|
||||
{
|
||||
itemsBin.Add(item.ItemDtmx);
|
||||
}
|
||||
else
|
||||
{
|
||||
itemsCart.Add(item.ItemDtmx);
|
||||
}
|
||||
// controllo ANCHE postprocessing
|
||||
if (item.PostProcList != "")
|
||||
{
|
||||
itemsSecOp.Add(item.ItemDtmx);
|
||||
// aggiungoncomunque a lista generale...
|
||||
itemsAll.Add(item.ItemDtmx);
|
||||
// controllo se sia SCRAP
|
||||
if (item.StatusID >= 990)
|
||||
{
|
||||
itemsScrap.Add(item.ItemDtmx);
|
||||
}
|
||||
// controllo SE sia stato depositato... check status 3/4
|
||||
else if (item.StatusID == 3 || item.StatusID == 4)
|
||||
{
|
||||
itemsDepo.Add(item.ItemDtmx);
|
||||
}
|
||||
else if (item.ProcessesReq.Contains("PaintFlag"))
|
||||
{
|
||||
itemsBin.Add(item.ItemDtmx);
|
||||
}
|
||||
else
|
||||
{
|
||||
itemsCart.Add(item.ItemDtmx);
|
||||
}
|
||||
// controllo ANCHE postprocessing
|
||||
if (item.PostProcList != "")
|
||||
{
|
||||
itemsSecOp.Add(item.ItemDtmx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FIX BIN
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL);
|
||||
|
||||
// FIX CART
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL);
|
||||
|
||||
// FIX Scaricati
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL);
|
||||
|
||||
// FIX SEC-OP
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL);
|
||||
|
||||
// FIX SCRAP
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsScrap", itemsScrap, dataCacheTTL);
|
||||
|
||||
// FIXED SEL da array oggetti selezionati...
|
||||
answ = updateCssByPickedItems(answ, redKeyBase, "ItemsSel", dataCacheTTL);
|
||||
|
||||
|
||||
// INFINE serializzo e salvo tutti gli items trovati...
|
||||
string serVal = JsonConvert.SerializeObject(itemsAll);
|
||||
memLayer.ML.setRSV($"{redKeyBase}:ItemsAll", serVal, dataCacheTTL);
|
||||
|
||||
// salvo redis css!
|
||||
memLayer.ML.setRSV($"{redKeyBase}:Css", answ, dataCacheTTL);
|
||||
}
|
||||
|
||||
|
||||
// FIX BIN
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL);
|
||||
|
||||
// FIX CART
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL);
|
||||
|
||||
// FIX Scaricati
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL);
|
||||
|
||||
// FIX SEC-OP
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL);
|
||||
|
||||
// FIX SCRAP
|
||||
answ = updateCssByItemList(answ, redKeyBase, "ItemsScrap", itemsScrap, dataCacheTTL);
|
||||
|
||||
// FIXED SEL da array oggetti selezionati...
|
||||
answ = updateCssByPickedItems(answ, redKeyBase, "ItemsSel", dataCacheTTL);
|
||||
|
||||
|
||||
// INFINE serializzo e salvo tutti gli items trovati...
|
||||
string serVal = JsonConvert.SerializeObject(itemsAll);
|
||||
memLayer.ML.setRSV($"{redKeyBase}:ItemsAll", serVal, dataCacheTTL);
|
||||
|
||||
// salvo redis css!
|
||||
memLayer.ML.setRSV($"{redKeyBase}:Css", answ, dataCacheTTL);
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
return answ;
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
<asp:LinkButton runat="server" ID="lbtMakeCnc" CssClass="btn btn-success btn-block" Visible='<%# Eval("OrdStatus").ToString()=="0" %>' OnClick="lbtMakeCnc_Click" OnClientClick='return confirm("Send to CAM?")'><i class="fa fa-laptop" aria-hidden="true"></i> MAKE CNC PROG</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col">
|
||||
<asp:LinkButton runat="server" ID="lbtPrintLabels" CssClass="btn btn-info btn-block" Visible='<%# Eval("OrdStatus").ToString()!="0" %>' OnClick="lbtPrintLabels_Click"><i class="fa fa-print" aria-hidden="true"></i> PRINT LABELS</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lblDone" CssClass="btn btn-success btn-block" Visible='<%# Eval("OrdStatus").ToString()=="2" %>' OnClick="lblDone_Click" OnClientClick='return confirm("Confirm Item production?")'><i class="fa fa-check" aria-hidden="true"></i> ITEM DONE</asp:LinkButton>
|
||||
<%--<asp:LinkButton runat="server" ID="lbtPrintLabels" CssClass="btn btn-info btn-block" Visible='<%# Eval("OrdStatus").ToString()!="0" %>' OnClick="lbtPrintLabels_Click"><i class="fa fa-print" aria-hidden="true"></i> PRINT LABELS</asp:LinkButton>--%>
|
||||
<%--<asp:LinkButton runat="server" ID="lblDone" CssClass="btn btn-success btn-block" Visible='<%# Eval("OrdStatus").ToString()=="2" %>' OnClick="lblDone_Click" OnClientClick='return confirm("Confirm Item production?")'><i class="fa fa-check" aria-hidden="true"></i> ITEM DONE</asp:LinkButton>--%>
|
||||
<asp:LinkButton runat="server" ID="lblDone" CssClass="btn btn-success btn-block" Visible='<%# (Eval("OrdStatus").ToString()=="1" && Eval("DrawFilePath").ToString()!="") || Eval("OrdStatus").ToString()=="2" %>' OnClick="lblDone_Click" OnClientClick='return confirm("Confirm Item production?")'><i class="fa fa-check" aria-hidden="true"></i> ITEM DONE</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtPrintLabels_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool allOk = true;
|
||||
#if false
|
||||
// chiamo procedura stampa report x etichette dei pezzi lavorati offline
|
||||
string printer = DataLayer.man.getPrinter("PC-MACHINE-OFFLINE");
|
||||
// ciclo tra TUTTI gli item compresi in questo Offline Order
|
||||
@@ -75,7 +76,8 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
// lancio stampa
|
||||
allOk = allOk && DataLayer.man.stampaDoc(item.ItemID.ToString(), printer, tipoDocumento.docPart, Request.UserHostName);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (allOk)
|
||||
{
|
||||
// registro che ho stampato... 2!
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<asp:UpdatePanel runat="server" ID="UpdatePanel2" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Timer ID="timerScrap" runat="server" Interval="5000" OnTick="timerScrap_Tick"></asp:Timer>
|
||||
<asp:Timer ID="timerScrap" runat="server" Interval="10000" OnTick="timerScrap_Tick"></asp:Timer>
|
||||
<div class="row m-2">
|
||||
<div class="col-12 col-md-6">
|
||||
<uc1:cmp_scrapList runat="server" ID="cmp_scrapList" />
|
||||
|
||||
@@ -9,51 +9,46 @@
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="mx-0">
|
||||
<%-- <asp:UpdatePanel runat="server" ID="upnlMain" UpdateMode="Always">
|
||||
<ContentTemplate>--%>
|
||||
<div class="card text-center" style="width: 100%;">
|
||||
<h4 class="card-header bg-secondary text-light"><%: traduci("MachineUnload") %> <sub>(<%: hfBatchID.Value %>)</sub></h4>
|
||||
<div class="card-body py-1 bg-dark">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="upnlStats" UpdateMode="Conditional">
|
||||
<div class="card text-center" style="width: 100%;">
|
||||
<h4 class="card-header bg-secondary text-light"><%: traduci("MachineUnload") %> <sub>(<%: hfBatchID.Value %>)</sub></h4>
|
||||
<div class="card-body py-1 bg-dark">
|
||||
<asp:UpdatePanel runat="server" ID="upnlStats" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<asp:Timer ID="timerSvg" runat="server" Interval="1500" OnTick="timerSvg_Tick"></asp:Timer>
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
<asp:HiddenField ID="hfSheetID" runat="server" />
|
||||
<uc1:cmp_MU_stats runat="server" ID="cmp_MU_stats" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row">
|
||||
<div class="col-2 pr-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlBins" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
<asp:HiddenField ID="hfSheetID" runat="server" />
|
||||
<uc1:cmp_MU_stats runat="server" ID="cmp_MU_stats" />
|
||||
<uc1:cmp_MU_bins runat="server" ID="cmp_MU_bins" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row">
|
||||
<div class="col-2 pr-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlBins" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<uc1:cmp_MU_bins runat="server" ID="cmp_MU_bins" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="col-8 py-0 my-0 px-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlDrawings" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Timer ID="timerSvg" runat="server" Interval="3000" OnTick="timerSvg_Tick"></asp:Timer>
|
||||
<uc1:cmp_MU_svgViewer runat="server" ID="cmp_MU_svgViewer" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="col-2 pl-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlCarts" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<uc1:cmp_MU_carts runat="server" ID="cmp_MU_carts" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel runat="server" ID="upnlSuggest" UpdateMode="Conditional">
|
||||
</div>
|
||||
<div class="col-8 py-0 my-0 px-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlDrawings" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<uc1:cmp_MU_suggestions runat="server" ID="cmp_MU_suggestions" Visible="false" />
|
||||
<uc1:cmp_MU_svgViewer runat="server" ID="cmp_MU_svgViewer" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="col-2 pl-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlCarts" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<uc1:cmp_MU_carts runat="server" ID="cmp_MU_carts" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<%--</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
<%--<asp:UpdatePanel runat="server" ID="upnlSuggest" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<uc1:cmp_MU_suggestions runat="server" ID="cmp_MU_suggestions" Visible="false" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
@@ -101,20 +101,20 @@ namespace NKC_WF
|
||||
{
|
||||
// in base al num di sec dell'ora decido cosa aggiornare...
|
||||
int counter = numWaitSvg;
|
||||
// ogni 2 sec bin/cart
|
||||
doUpdate();
|
||||
if (counter % 5 == 0)
|
||||
// ogni x cicli
|
||||
if (counter % 10 == 0)
|
||||
{
|
||||
cmp_MU_stats.doUpdate();
|
||||
upnlStats.DataBind();
|
||||
}
|
||||
//if (counter % 2 == 0)
|
||||
//{
|
||||
cmp_MU_carts.doUpdate();
|
||||
upnlCarts.DataBind();
|
||||
cmp_MU_bins.doUpdate();
|
||||
upnlCarts.DataBind();
|
||||
//}
|
||||
if (counter % 2 == 0)
|
||||
{
|
||||
cmp_MU_carts.doUpdate();
|
||||
upnlCarts.DataBind();
|
||||
cmp_MU_bins.doUpdate();
|
||||
upnlCarts.DataBind();
|
||||
}
|
||||
incrNumWait();
|
||||
}
|
||||
/// <summary>
|
||||
@@ -140,7 +140,7 @@ namespace NKC_WF
|
||||
/// </summary>
|
||||
protected void incrNumWait()
|
||||
{
|
||||
if (numWaitSvg > 10)
|
||||
if (numWaitSvg > 30)
|
||||
{
|
||||
memLayer.ML.resetRCnt(redProdReq);
|
||||
Response.Redirect(Request.RawUrl);
|
||||
|
||||
+9
-27
@@ -23,6 +23,15 @@ namespace NKC_WF
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel upnlStats;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo timerSvg.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer timerSvg;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfBatchID.
|
||||
/// </summary>
|
||||
@@ -77,15 +86,6 @@ namespace NKC_WF
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel upnlDrawings;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo timerSvg.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer timerSvg;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_svgViewer.
|
||||
/// </summary>
|
||||
@@ -112,23 +112,5 @@ namespace NKC_WF
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MU_carts cmp_MU_carts;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo upnlSuggest.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel upnlSuggest;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_suggestions.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MU_suggestions cmp_MU_suggestions;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user