128 lines
3.2 KiB
C#
128 lines
3.2 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.JSInterop;
|
|
using MP.INVE.Data;
|
|
using Blazored.LocalStorage;
|
|
using MP.Core.DTO;
|
|
|
|
namespace MP.INVE.Pages
|
|
{
|
|
public partial class InveSession
|
|
{
|
|
[Inject]
|
|
private MiDataService MIDataservice { get; set; } = null!;
|
|
|
|
private SelectInveSessionParams currParams = new SelectInveSessionParams();
|
|
|
|
protected string searchVal
|
|
{
|
|
get => currParams.searchVal;
|
|
set => currParams.searchVal = value;
|
|
}
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await getId();
|
|
}
|
|
private void openNew()
|
|
{
|
|
reqNew = true;
|
|
|
|
}
|
|
protected async Task toggle()
|
|
{
|
|
inCorso = !inCorso;
|
|
await Task.Delay(1);
|
|
}
|
|
|
|
protected async Task reset()
|
|
{
|
|
searchVal = "";
|
|
await Task.Delay(1);
|
|
}
|
|
|
|
private bool isLoading { get; set; } = false;
|
|
|
|
private int totalCount
|
|
{
|
|
get => currParams.TotCount;
|
|
set => currParams.TotCount = value;
|
|
}
|
|
private int numRecord
|
|
{
|
|
get => currParams.NumRec;
|
|
set
|
|
{
|
|
if (currParams.NumRec != value)
|
|
{
|
|
currParams.NumRec = value;
|
|
}
|
|
}
|
|
}
|
|
private int currPage
|
|
{
|
|
get => currParams.CurrPage;
|
|
set
|
|
{
|
|
if (currParams.CurrPage != value)
|
|
{
|
|
currParams.CurrPage = value;
|
|
}
|
|
}
|
|
}
|
|
private string idOperatore
|
|
{
|
|
get => currParams.idOperatore;
|
|
set => currParams.idOperatore = value;
|
|
}
|
|
private bool reqNew
|
|
{
|
|
get => currParams.reqNew;
|
|
set => currParams.reqNew = value;
|
|
}
|
|
private bool inCorso
|
|
{
|
|
get => currParams.inCorso;
|
|
set
|
|
{
|
|
if (currParams.inCorso != value)
|
|
{
|
|
currParams.inCorso = value;
|
|
}
|
|
}
|
|
|
|
}
|
|
private string authKey
|
|
{
|
|
get => currParams.authKey;
|
|
set => currParams.authKey = value;
|
|
}
|
|
|
|
[Inject]
|
|
protected ILocalStorageService localStorage { get; set; } = null!;
|
|
[Inject]
|
|
protected NavigationManager NavManager { get; set; } = null!;
|
|
[Inject]
|
|
protected IJSRuntime JSRuntime { get; set; } = null!;
|
|
|
|
protected void ForceReload(int newNum)
|
|
{
|
|
numRecord = newNum;
|
|
}
|
|
|
|
protected void ForceReloadPage(int newNum)
|
|
{
|
|
currPage = newNum;
|
|
}
|
|
[Inject]
|
|
protected MessageService MsgService { get; set; } = null!;
|
|
protected async Task getId()
|
|
{
|
|
OperatoreDTO local = new OperatoreDTO();
|
|
local = await MsgService.getCurrOperDtoAsync();
|
|
if (local != null)
|
|
{
|
|
idOperatore = local.MatrOpr.ToString();
|
|
authKey = local.hashAuthKey;
|
|
}
|
|
}
|
|
}
|
|
} |