Files
mapo-core/MP.INVE/Components/LotScanDetail.razor.cs
Samuele E. Locatelli 50d65eebaa MP.DATA, riorganizzazioni varie:
- renaming classi gestione DbModels in
- spostamento anagrafica flussi da auth a generale
2025-03-08 10:40:09 +01:00

72 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.JSInterop;
using MP.INVE;
using MP.INVE.Shared;
using MP.INVE.Components;
using MP.Data.DbModels;
using MP.INVE.Data;
namespace MP.INVE.Components
{
public partial class LotScanDetail
{
[Parameter]
public string LottoSel { get; set; } = "";
[Parameter]
public string CodArtSel { get; set; } = "";
[Parameter]
public int InveSessID { get; set; } = 0;
protected override async Task OnParametersSetAsync()
{
await reloadData();
}
private async Task reloadData()
{
ListRecords = null;
//totalCount = 0;
isLoading = true;
SearchRecords = await MIService.ScanByLottoSession(LottoSel, InveSessID);
totalCount = SearchRecords.Count;
ListRecords = SearchRecords;//.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
await Task.Delay(1);
await InvokeAsync(() => StateHasChanged());
await Task.Delay(1);
isLoading = false;
}
private int _totalCount { get; set; } = 0;
private int totalCount
{
get => _totalCount;
set
{
if (_totalCount != value)
{
_totalCount = value;
//updateRecordCount.InvokeAsync(value);
}
}
}
private List<ScanDataModel>? SearchRecords;
protected List<ScanDataModel>? ListRecords;
public bool isLoading { get; set; }
[Inject]
protected MiDataService MIService { get; set; } = null!;
}
}