Add filtro in Diario (non connesso)
This commit is contained in:
@@ -4,7 +4,14 @@
|
||||
@using MP.Stats.Data
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary h1">Diario Produzione</div>
|
||||
<div class="card-header table-primary">
|
||||
<div class="row">
|
||||
<div class="col-6 col-lg-2 h2">Diario Produzione</div>
|
||||
<div class="col-6 col-lg-10">
|
||||
<SelectionFilter SelFilter="currFilter" filterChanged="DoFilter"></SelectionFilter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (currRecord != null)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace MP.Stats.Pages
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private SelectData currFilter { get; set; } = new SelectData();
|
||||
private int numRecord { get; set; } = 10;
|
||||
|
||||
#endregion Private Properties
|
||||
@@ -38,12 +39,28 @@ namespace MP.Stats.Pages
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task reloadData()
|
||||
{
|
||||
//ListRecords = await StatService.StatScartiGetAll(currFilter.DateStart, currFilter.DateEnd, currFilter.IdxMacchina, currFilter.IdxOdl, currFilter.KeyRichiesta, currFilter.CodArticolo, numRecord, MessageService.SearchVal);
|
||||
ListRecords = await StatService.StatDdbGetAll(numRecord, MessageService.SearchVal);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task DoFilter(SelectData newFilter)
|
||||
{
|
||||
currFilter = newFilter;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
protected async Task ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
ListRecords = await StatService.StatDdbGetAll(numRecord, MessageService.SearchVal);
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
@@ -51,7 +68,7 @@ namespace MP.Stats.Pages
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = true;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
ListRecords = await StatService.StatDdbGetAll(numRecord, MessageService.SearchVal);
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
protected void ResetData()
|
||||
@@ -63,7 +80,7 @@ namespace MP.Stats.Pages
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
ListRecords = await StatService.StatDdbGetAll(numRecord, MessageService.SearchVal);
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
Reference in New Issue
Block a user