diff --git a/MP-TAB/MP-TAB.Client/Pages/TCHistory.razor b/MP-TAB/MP-TAB.Client/Pages/TCHistory.razor index 1e59e5f2..e38d5f3d 100644 --- a/MP-TAB/MP-TAB.Client/Pages/TCHistory.razor +++ b/MP-TAB/MP-TAB.Client/Pages/TCHistory.razor @@ -9,7 +9,6 @@
- @@ -38,7 +37,7 @@ @item.DescArticolo @@ -54,17 +53,18 @@ }
- @item.Tcassegnato +
@item.Tcassegnato
@item.Tcassegnato
@item.Note
- -
+ @code { - [Parameter] - public int MatrOpr { get; set; } = 0; + [Parameter] + public int MatrOpr { get; set; } = 0; - [Inject] - protected IConfiguration config { get; set; } = null!; + [Inject] + protected IConfiguration config { get; set; } = null!; protected int SearchMinChar = 3; protected string CodArt = ""; @@ -72,6 +72,11 @@ protected string BaseAddr = ""; protected bool isLoading = false; + protected int PageSize = 10; + protected int TotalCount = 0; + protected int PageNum = 1; + + protected List ListComplete { get; set; } = new List(); protected List ListODL { get; set; } = new List(); protected override async Task OnInitializedAsync() @@ -102,7 +107,17 @@ var rawData = await Http.GetFromJsonAsync>(ApiUrl); if (rawData != null) { - ListODL = rawData; + ListComplete = rawData; + TotalCount = ListComplete.Count; + // esegue paginazione + if(TotalCount>PageSize) + { + ListODL = ListComplete.Skip((PageNum - 1) * PageSize).Take(PageSize).ToList(); + } + else + { + ListODL = ListComplete; + } } } catch(Exception exc) diff --git a/MP.Data/Services/OrderDataSrv.cs b/MP.Data/Services/OrderDataSrv.cs index 89329c48..c52d7043 100644 --- a/MP.Data/Services/OrderDataSrv.cs +++ b/MP.Data/Services/OrderDataSrv.cs @@ -61,7 +61,7 @@ namespace MP.Data.Services /// Cod articolo /// Macchina selezionata /// - public async Task> ListODLFilt(string CodArt, string IdxMacchina) + public async Task> ListODLFilt(string CodArt, string IdxMacchina="*") { // setup parametri costanti bool inCorso = false;