diff --git a/MP.INVE/Components/InveSessionList.razor.cs b/MP.INVE/Components/InveSessionList.razor.cs index 14b129a9..1434fecc 100644 --- a/MP.INVE/Components/InveSessionList.razor.cs +++ b/MP.INVE/Components/InveSessionList.razor.cs @@ -104,6 +104,11 @@ namespace MP.INVE.Components get => currParams.authKey; set => currParams.authKey = value; } + private string searchVal + { + get => currParams.searchVal; + set => currParams.searchVal = value; + } [Inject] private IConfiguration Configuration { get; set; } = null!; @@ -221,6 +226,12 @@ namespace MP.INVE.Components { SearchRecords = MIDataservice.InventSessHistList(); } + //verifico filtro ricerca mag + if (!string.IsNullOrEmpty(searchVal)) + { + StringComparison strComp = StringComparison.CurrentCultureIgnoreCase; + SearchRecords = SearchRecords.Where(x => x.AnagMagNav.DescMag.Contains(searchVal, strComp) || x.Description.Contains(searchVal, strComp)).ToList(); + } totalCount = SearchRecords.Count; elencoSessioni = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); await Task.Delay(1); diff --git a/MP.INVE/Data/SelectInveSessionParams.cs b/MP.INVE/Data/SelectInveSessionParams.cs index 641536c3..9fbd04aa 100644 --- a/MP.INVE/Data/SelectInveSessionParams.cs +++ b/MP.INVE/Data/SelectInveSessionParams.cs @@ -23,6 +23,7 @@ namespace MP.INVE.Data public int currIdSession { get; set; } = 0; public int currIdMag { get; set; } = 0; public bool reqNew { get; set; } = false; + public string searchVal { get; set; } = ""; #endregion Public Properties @@ -33,6 +34,9 @@ namespace MP.INVE.Data if (!(obj is SelectInveSessionParams item)) return false; + if (searchVal != item.searchVal) + return false; + if (MaxRecord != item.MaxRecord) return false; diff --git a/MP.INVE/Pages/InveSession.razor b/MP.INVE/Pages/InveSession.razor index 26103cd0..3e90668e 100644 --- a/MP.INVE/Pages/InveSession.razor +++ b/MP.INVE/Pages/InveSession.razor @@ -4,10 +4,19 @@