Filtro eventi macchina spenta

- preso da semaforo (no idxStato)
This commit is contained in:
Samuele Locatelli
2022-10-20 09:31:42 +02:00
parent e948ae31af
commit 921bf52659
6 changed files with 16 additions and 13 deletions
+11 -8
View File
@@ -231,14 +231,17 @@ namespace MP.SPEC.Components
{
if (hideSpenta)
{
var tsDurata = TimeSpan.FromMinutes(ListOdlStats.Where(x => x.IdxStato != 11).Sum(x => x.TotDurata));
if (tsDurata.TotalDays < 1)
if (ListOdlStatsNetto != null)
{
answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
}
else
{
answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
var tsDurata = TimeSpan.FromMinutes(ListOdlStatsNetto.Sum(x => x.TotDurata));
if (tsDurata.TotalDays < 1)
{
answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
}
else
{
answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
}
}
}
else
@@ -406,7 +409,7 @@ namespace MP.SPEC.Components
if (currRec != null)
{
ListOdlStats = await MDService.StatOdl(currRec.IdxOdl);
ListOdlStatsNetto = ListOdlStats.Where(x => x.IdxStato != 11).ToList();
ListOdlStatsNetto = ListOdlStats.Where(x => x.Semaforo != "sGr").ToList();
}
else
{
+1 -1
View File
@@ -68,7 +68,7 @@ namespace MP.SPEC.Components
// se hideSpenta --> filtro stato 11 = spenta...
if (hideSpenta)
{
ListRecords = ListRecords.Where(x => x.IdxStato != 11).ToList();
ListRecords = ListRecords.Where(x => x.Semaforo != "sGr").ToList();
}
foreach (var record in ListRecords)
{
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2210.1920</Version>
<Version>6.16.2210.2009</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2210.1920</h4>
<h4>Versione: 6.16.2210.2009</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2210.1920
6.16.2210.2009
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2210.1920</version>
<version>6.16.2210.2009</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>