diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index 3729a110..0bf33530 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -19,10 +19,10 @@ else
@*
- - - -
*@ + + + +
*@ } @@ -99,9 +99,8 @@ else else {
- @*
@($"{DateTime.Now:yyyy/MM/dd}")
-
@($"{DateTime.Now:ddd HH:mm:ss}")
*@ -
NOW
+
@($"{DateTime.Now:yyyy/MM/dd}")
+
@($"{DateTime.Now:ddd HH:mm:ss}")
} @@ -173,18 +172,13 @@ else else {
- @*
@($"{DateTime.Now:yyyy/MM/dd}")
-
@($"{DateTime.Now:ddd HH:mm:ss}")
*@ -
NOW
+
@($"{DateTime.Now:yyyy/MM/dd}")
+
@($"{DateTime.Now:ddd HH:mm:ss}")
} - - - - diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs index de926587..619f0775 100644 --- a/MP.SPEC/Components/ListODL.razor.cs +++ b/MP.SPEC/Components/ListODL.razor.cs @@ -6,7 +6,7 @@ using MP.SPEC.Services; namespace MP.SPEC.Components { - public partial class ListODL + public partial class ListODL: IDisposable { #region Public Properties @@ -53,10 +53,14 @@ namespace MP.SPEC.Components [Inject] protected MpDataService MDService { get; set; } = null!; -#if false - [Inject] - protected MessageService MessageService { get; set; } = null!; -#endif + + + public void Dispose() + { + currRecord = null; + SearchRecords = null; + ListRecords= null; + } [Inject] protected IOApiService MpIoApiCall { get; set; } = null!; diff --git a/MP.SPEC/Components/ListPODL.razor.cs b/MP.SPEC/Components/ListPODL.razor.cs index c59d0875..ec59e0eb 100644 --- a/MP.SPEC/Components/ListPODL.razor.cs +++ b/MP.SPEC/Components/ListPODL.razor.cs @@ -13,7 +13,7 @@ namespace MP.SPEC.Components [Parameter] public SelectPOdlParams actFilter { get; set; } = new SelectPOdlParams(); - private SelectPOdlParams lastFilter { get; set; } = new SelectPOdlParams(); + private SelectPOdlParams lastFilter { get; set; } = new SelectPOdlParams() { CurrPage = -1 }; [Parameter] public EventCallback PagerResetReq { get; set; } diff --git a/MP.SPEC/Data/SelectPOdlParams.cs b/MP.SPEC/Data/SelectPOdlParams.cs index 5d6528db..a4836926 100644 --- a/MP.SPEC/Data/SelectPOdlParams.cs +++ b/MP.SPEC/Data/SelectPOdlParams.cs @@ -1,7 +1,4 @@ -using MP.Data; -using System.Runtime.CompilerServices; - -namespace MP.SPEC.Data +namespace MP.SPEC.Data { public class SelectPOdlParams { @@ -10,6 +7,28 @@ namespace MP.SPEC.Data public SelectPOdlParams() { } + #endregion Public Constructors + + #region Public Properties + + public string CodFase { get; set; } = "*"; + + public int CurrPage { get; set; } = 1; + + public string IdxMacchina { get; set; } = "*"; + + public int MaxRecord { get; set; } = 100; + + public int NumRec { get; set; } = 10; + + public string SearchVal { get; set; } = "*"; + + public int TotCount { get; set; } = 0; + + #endregion Public Properties + + #region Public Methods + public SelectPOdlParams clone() { SelectPOdlParams clonedData = new SelectPOdlParams() @@ -25,28 +44,12 @@ namespace MP.SPEC.Data return clonedData; } - #endregion Public Constructors - - #region Public Properties - - public string CodFase { get; set; } = "*"; - public string IdxMacchina { get; set; } = "*"; - public int CurrPage { get; set; } = 1; - public int NumRec { get; set; } = 10; - public int TotCount { get; set; } = 0; - public int MaxRecord { get; set; } = 100; - public string SearchVal { get; set; } = "*"; - - #endregion Public Properties - - #region Public Methods - public override bool Equals(object obj) { - if (!(obj is SelectOdlParams item)) + if (!(obj is SelectPOdlParams item)) return false; - if (CodFase != item.CodStato) + if (CodFase != item.CodFase) return false; if (MaxRecord != item.MaxRecord) @@ -54,6 +57,7 @@ namespace MP.SPEC.Data if (NumRec != item.NumRec) return false; + if (TotCount != item.TotCount) return false; diff --git a/MP.SPEC/Pages/ODL.razor.cs b/MP.SPEC/Pages/ODL.razor.cs index dab3642f..a8ff4f78 100644 --- a/MP.SPEC/Pages/ODL.razor.cs +++ b/MP.SPEC/Pages/ODL.razor.cs @@ -26,7 +26,7 @@ namespace MP.SPEC.Pages #region Protected Fields - protected DataPager pagerODL; + protected DataPager pagerODL = null!; #endregion Protected Fields @@ -44,11 +44,6 @@ namespace MP.SPEC.Pages [Inject] protected MpDataService MDService { get; set; } = null!; -#if false - [Inject] - protected MessageService MsgService { get; set; } = null!; -#endif - protected DateTime selDtEnd { get => currFilter.DtEnd; @@ -91,10 +86,6 @@ namespace MP.SPEC.Pages { ListStati = await MDService.AnagStatiComm(); ListMacchine = await MDService.MacchineWithFlux(); -#if false - // carico dati - await reloadData(); -#endif } protected async Task pgResetReq(bool doReset) @@ -114,9 +105,7 @@ namespace MP.SPEC.Pages protected void UpdateTotCount(int newTotCount) { -#if false - totalCount = newTotCount; -#endif + totalCount = newTotCount; } #endregion Protected Methods diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index f5c83e96..edd74ebb 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -226,9 +226,6 @@ } - - - - + \ No newline at end of file diff --git a/MP.SPEC/Pages/PODL.razor.cs b/MP.SPEC/Pages/PODL.razor.cs index 268d2729..b9699f04 100644 --- a/MP.SPEC/Pages/PODL.razor.cs +++ b/MP.SPEC/Pages/PODL.razor.cs @@ -11,7 +11,7 @@ namespace MP.SPEC.Pages { #region Protected Fields - protected DataPager pagerODL; + protected DataPager pagerODL = null!; protected bool reqNew = false; @@ -153,11 +153,6 @@ namespace MP.SPEC.Pages await Task.Delay(1); } - protected void updateTotal(int newTotCount) - { - totalCount = newTotCount; - } - protected void UpdateTotCount(int newTotCount) { totalCount = newTotCount;