fix comportamento semaforo

This commit is contained in:
Samuele Locatelli
2021-07-01 17:01:11 +02:00
parent 3bd0c3e8b9
commit aaad4e9f3a
2 changed files with 21 additions and 12 deletions
+12 -12
View File
@@ -2,15 +2,15 @@
<asp:HiddenField runat="server" ID="hfMachine" Value="NE00" />
<asp:HiddenField runat="server" ID="hfMachClass" Value="light" />
<asp:HiddenField runat="server" ID="hfStat01" Value="01" />
<asp:HiddenField runat="server" ID="hfStat02" Value="01" />
<asp:HiddenField runat="server" ID="hfStat03" Value="01" />
<asp:HiddenField runat="server" ID="hfCode01" Value="01" />
<asp:HiddenField runat="server" ID="hfCode02" Value="01" />
<asp:HiddenField runat="server" ID="hfCode03" Value="01" />
<asp:HiddenField runat="server" ID="hfCss01" Value="warning" />
<asp:HiddenField runat="server" ID="hfCss02" Value="success" />
<asp:HiddenField runat="server" ID="hfCss03" Value="danger" />
<asp:HiddenField runat="server" ID="hfStat01" Value="UNK" />
<asp:HiddenField runat="server" ID="hfStat02" Value="UNK" />
<asp:HiddenField runat="server" ID="hfStat03" Value="UNK" />
<asp:HiddenField runat="server" ID="hfCode01" Value="00" />
<asp:HiddenField runat="server" ID="hfCode02" Value="00" />
<asp:HiddenField runat="server" ID="hfCode03" Value="00" />
<asp:HiddenField runat="server" ID="hfCss01" Value="default" />
<asp:HiddenField runat="server" ID="hfCss02" Value="default" />
<asp:HiddenField runat="server" ID="hfCss03" Value="default" />
<div class="row" runat="server" id="divSelect">
<asp:DropDownList runat="server" ID="ddlMachine" CssClass="form-control" AutoPostBack="True" OnSelectedIndexChanged="ddlMachine_SelectedIndexChanged">
@@ -23,11 +23,11 @@
<asp:UpdatePanel runat="server" ID="upnlTitle" UpdateMode="Conditional">
<ContentTemplate>
<asp:Timer ID="timerLoad" runat="server" Interval="2000" OnTick="timerLoad_Tick"></asp:Timer>
<div class="row" runat="server" id="divRuntime">
<div class="col-3">
<div class="row small" runat="server" id="divRuntime">
<div class="col-2 pr-0">
<asp:LinkButton runat="server" ID="lbtReset" class="btn btn-info btn-block text-center" OnClick="lbtReset_Click"><i class="fa fa-refresh" aria-hidden="true"></i>&nbsp;<%: hfMachine.Value %></asp:LinkButton>
</div>
<div class="col-9">
<div class="col-10">
<div class="d-flex text-center">
<div class="p-2 bg-<%: hfCss01.Value %> flex-fill">
<b><i class="fa fa-qrcode" aria-hidden="true"></i>&nbsp;<%: traduci("print") %>&nbsp;|&nbsp;<%: hfCode01.Value %></b><div class="small">
@@ -117,6 +117,15 @@ namespace NKC_WF.WebUserControls
public void doUpdate()
{
// verifico status delle 3 parti e mostro relativo semaforo...
hfCode01.Value = "00";
hfCss01.Value = "dark";
hfStat01.Value = "UNKNOWN";
hfCode02.Value = "00";
hfCss02.Value = "dark";
hfStat02.Value = "UNKNOWN";
hfCode03.Value = "00";
hfCss03.Value = "dark";
hfStat03.Value = "UNKNOWN";
// leggo da redis lo status
var currState = ComLib.prodMachStateDataGet();