<%: traduci("unload") %> | <%: hfCode03.Value %>
<%: hfStat03.Value %>
diff --git a/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs b/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs
index a63fdac..409c0cb 100644
--- a/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs
@@ -69,17 +69,22 @@ namespace NKC_WF.WebUserControls
{
// recupero dati
DS_App.StatusDecodeRow thisState = null;
- var currInfo = currState.Where(x => x.Machine == currMachine).FirstOrDefault();
- var lastState = currInfo.Records.Where(x => x.Station == name).OrderByDescending(x => x.DtRecord).FirstOrDefault();
- if (lastState == null)
+ try
{
- // aggiungo ND
- }
- else
- {
- // verifico la decodifica x ognuno
- thisState = ComLib.checkStationDecode(name, lastState.Code);
+ var currInfo = currState.Where(x => x.Machine == currMachine).FirstOrDefault();
+ var lastState = currInfo.Records.Where(x => x.Station == name).OrderByDescending(x => x.DtRecord).FirstOrDefault();
+ if (lastState == null)
+ {
+ // aggiungo ND
+ }
+ else
+ {
+ // verifico la decodifica x ognuno
+ thisState = ComLib.checkStationDecode(name, lastState.Code);
+ }
}
+ catch
+ { }
return thisState;
}
@@ -118,13 +123,13 @@ namespace NKC_WF.WebUserControls
{
// verifico status delle 3 parti e mostro relativo semaforo...
hfCode01.Value = "00";
- hfCss01.Value = "dark";
+ hfCss01.Value = "secondary";
hfStat01.Value = "UNKNOWN";
hfCode02.Value = "00";
- hfCss02.Value = "dark";
+ hfCss02.Value = "secondary";
hfStat02.Value = "UNKNOWN";
hfCode03.Value = "00";
- hfCss03.Value = "dark";
+ hfCss03.Value = "secondary";
hfStat03.Value = "UNKNOWN";
// leggo da redis lo status
@@ -154,39 +159,6 @@ namespace NKC_WF.WebUserControls
hfCss03.Value = state03.Css;
hfStat03.Value = state03.Descript;
}
-
- // imposto nuovi eventi FAKE...
-
- //// FIXME TODO: fake....
- //DateTime adesso = DateTime.Now;
- //int numsec = adesso.Second;
- //hfCss01.Value = "success";
- //hfCss02.Value = "warning";
- //hfCss03.Value = "danger";
- //hfStat01.Value = $"{adesso.Second - 1 % 10:00}";
- //hfStat02.Value = $"{adesso.Second + 3 % 10:00}";
- //hfStat03.Value = $"{adesso.Second + 1 % 10:00}";
- //switch (numsec % 3)
- //{
- // case 1:
- // hfCss01.Value = "warning";
- // hfCss02.Value = "danger";
- // hfCss03.Value = "success";
- // break;
-
- // case 2:
- // hfCss01.Value = "danger";
- // hfCss02.Value = "success";
- // hfCss03.Value = "warning";
- // break;
-
- // case 0:
- // default:
- // hfCss01.Value = "success";
- // hfCss02.Value = "warning";
- // hfCss03.Value = "danger";
- // break;
- //}
}
#endregion Public Methods