Ancora update display IOB info (mancano ENR senza macchina)
This commit is contained in:
@@ -50,6 +50,9 @@
|
||||
<th>IOB Type</th>
|
||||
<th>IOB IP</th>
|
||||
<th>IOB Name</th>
|
||||
<th>Count</th>
|
||||
<th>Tipo</th>
|
||||
<th>Vers</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -77,12 +80,20 @@
|
||||
<td>@cIobInfo.iType</td>
|
||||
<td>@cIobInfo.IP</td>
|
||||
<td>@cIobInfo.name</td>
|
||||
<td>
|
||||
@{
|
||||
string icnCol = cIobInfo.CNC_Counter ? "fa-solid fa-thumbs-up text-success" : "fa-solid fa-thumbs-down text-secondary";
|
||||
}
|
||||
<i class="@icnCol"></i>
|
||||
</td>
|
||||
<td>@MacIobConf(item.IdxMacchina, "IobType")</td>
|
||||
<td>@MacIobConf(item.IdxMacchina, "IobVersion")</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<td colspan="14">
|
||||
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
</td>
|
||||
|
||||
@@ -103,12 +103,13 @@ namespace MP.Land.Pages
|
||||
AllRecords = AppDService.MacchineGetAll();
|
||||
// leggo le info IOB x ogni record trovato...
|
||||
DictIobInfo = AllRecords.ToDictionary(x => x.IdxMacchina, x => TabSrv.IobInfo(x.IdxMacchina));
|
||||
DictMachData = AllRecords.ToDictionary(x => x.IdxMacchina, x => TabSrv.MachIobConf(x.IdxMacchina));
|
||||
RefreshDisplay();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected Dictionary<string, Core.Objects.IOB_data> DictIobInfo = new Dictionary<string, Core.Objects.IOB_data>();
|
||||
|
||||
protected Dictionary<string, Dictionary<string, string>> DictMachData = new Dictionary<string, Dictionary<string, string>>();
|
||||
protected Core.Objects.IOB_data CurrIobInfo(string idxMacc)
|
||||
{
|
||||
Core.Objects.IOB_data answ = new Core.Objects.IOB_data();
|
||||
@@ -118,6 +119,19 @@ namespace MP.Land.Pages
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
public string MacIobConf(string idxMacc, string kReq)
|
||||
{
|
||||
string answ = "-";
|
||||
if (DictMachData.ContainsKey(idxMacc))
|
||||
{
|
||||
var cRec = DictMachData[idxMacc];
|
||||
if (cRec.ContainsKey(kReq))
|
||||
{
|
||||
answ = cRec[kReq];
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private bool isLoading = false;
|
||||
private int currPage = 1;
|
||||
|
||||
Reference in New Issue
Block a user