133 lines
3.0 KiB
C#
133 lines
3.0 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.JSInterop;
|
|
using MP.SPEC.Components;
|
|
using MP.SPEC.Data;
|
|
|
|
namespace MP.SPEC.Pages
|
|
{
|
|
public partial class ODL
|
|
{
|
|
#region Public Properties
|
|
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Fields
|
|
|
|
protected DataPager pagerODL;
|
|
|
|
#endregion Protected Fields
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected IJSRuntime JSRuntime { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected MpDataService MDService { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected MessageService MsgService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected void ForceReload(int newNum)
|
|
{
|
|
numRecord = newNum;
|
|
}
|
|
|
|
protected void ForceReloadPage(int newNum)
|
|
{
|
|
currPage = newNum;
|
|
}
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
// abilito ricerca...
|
|
MsgService.ShowSearch = true;
|
|
// resetto search
|
|
MsgService.SearchVal = "";
|
|
ListStati = await MDService.AnagStatiComm();
|
|
#if false
|
|
// carico dati
|
|
await reloadData();
|
|
#endif
|
|
}
|
|
|
|
protected async Task pgResetReq(bool doReset)
|
|
{
|
|
if (doReset)
|
|
{
|
|
await pagerODL.resetCurrPage();
|
|
}
|
|
}
|
|
|
|
protected void UpdateTotCount(int newTotCount)
|
|
{
|
|
totalCount = newTotCount;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private List<MP.Data.DatabaseModels.ListValues>? ListStati;
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Properties
|
|
|
|
private SelectOdlParams currFilter { get; set; } = new SelectOdlParams();
|
|
|
|
private int currPage
|
|
{
|
|
get => MsgService.currPage;
|
|
set => MsgService.currPage = value;
|
|
}
|
|
|
|
private bool isLoading { get; set; } = false;
|
|
|
|
private int numRecord
|
|
{
|
|
get => MsgService.numRecord;
|
|
set => MsgService.numRecord = value;
|
|
}
|
|
|
|
private string selStato
|
|
{
|
|
get => currFilter.CodStato;
|
|
set => currFilter.CodStato = value;
|
|
}
|
|
|
|
private SelectGlobalToggle toggleFilter { get; set; } = new SelectGlobalToggle();
|
|
|
|
private int totalCount
|
|
{
|
|
get => MsgService.totalCount;
|
|
set => MsgService.totalCount = value;
|
|
}
|
|
|
|
#endregion Private Properties
|
|
|
|
#region Private Methods
|
|
|
|
protected bool isActive
|
|
{
|
|
get => currFilter.IsActive;
|
|
set => currFilter.IsActive = value;
|
|
}
|
|
|
|
private string leftStringCSS
|
|
{
|
|
get => isActive ? "text-secondary" : "text-dark";
|
|
}
|
|
private string rightStringCSS
|
|
{
|
|
get => isActive ? "text-dark" : "text-secondary";
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |