diff --git a/MP.SPEC/Components/ListPARAMS.razor.cs b/MP.SPEC/Components/ListPARAMS.razor.cs
index 2ef8726a..31574c02 100644
--- a/MP.SPEC/Components/ListPARAMS.razor.cs
+++ b/MP.SPEC/Components/ListPARAMS.razor.cs
@@ -3,6 +3,7 @@ using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.SPEC.Data;
using System.Diagnostics;
+using MP.Data;
namespace MP.SPEC.Components
{
@@ -156,6 +157,7 @@ namespace MP.SPEC.Components
protected async Task resetSel()
{
currRecord = null;
+ setDtMax();
await RecordSel.InvokeAsync(null);
}
@@ -163,6 +165,8 @@ namespace MP.SPEC.Components
{
currRecord = selRec;
SelFilter.IdxMacchina = selRec.IdxMacchina;
+ SelDtMax = selRec.dtEvento;
+ //selDtMin = RoundDatetime(5).AddHours(-25);
await reloadData(false);
await RecordSel.InvokeAsync(selRec);
}
@@ -224,8 +228,33 @@ namespace MP.SPEC.Components
private DateTime? SelDtMax
{
get => SelFilter.dtMax;
+ set => SelFilter.dtMax = value;
+ }
+ protected void setDtMax()
+ {
+ // copio il filtro
+ var currFilt = SelFilter;
+ // fermo update
+ currFilt.LiveUpdate = true;
+ currFilt.CurrPage = 0;
+ currFilt.lastUpdate = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss}";
+ currFilt.dtMax = RoundDatetime(5);
+ currFilt.dtMin = RoundDatetime(5).AddHours(-25);
+ SelFilter = currFilt;
}
+ ///