85 lines
1.9 KiB
C#
85 lines
1.9 KiB
C#
using Lux.UI.Components.Compo.Generic;
|
|
|
|
namespace Lux.UI.Components.Pages
|
|
{
|
|
public partial class GenList
|
|
{
|
|
#region Protected Methods
|
|
|
|
protected override Task OnInitializedAsync()
|
|
{
|
|
isLoading = true;
|
|
return ReloadBaseData();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private ItemModel? editRecord = null;
|
|
private bool isLoading = false;
|
|
private List<GenClassModel> ListGenClass = new List<GenClassModel>();
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Properties
|
|
|
|
private GenValMan.FiltSelect CurrFilt { get; set; } = new GenValMan.FiltSelect();
|
|
|
|
[Inject]
|
|
private IGenClassService DLService { get; set; } = null!;
|
|
|
|
private string SearchVal
|
|
{
|
|
get => CurrFilt.SearchVal;
|
|
set
|
|
{
|
|
isLoading = true;
|
|
CurrFilt.SearchVal = value;
|
|
isLoading = false;
|
|
}
|
|
}
|
|
|
|
private string SelCodGroup
|
|
{
|
|
get => CurrFilt.SelCodGroup;
|
|
set
|
|
{
|
|
if (CurrFilt.SelCodGroup != value)
|
|
{
|
|
isLoading = true;
|
|
CurrFilt.SelCodGroup = value;
|
|
isLoading = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion Private Properties
|
|
|
|
#region Private Methods
|
|
|
|
private Task ForceReloadAsync()
|
|
{
|
|
return ReloadBaseData();
|
|
}
|
|
|
|
private async Task ReloadBaseData()
|
|
{
|
|
isLoading = true;
|
|
ListGenClass = await DLService.GetAllAsync();
|
|
isLoading = false;
|
|
}
|
|
|
|
private void ResetSearch()
|
|
{
|
|
SearchVal = "";
|
|
}
|
|
|
|
private void SaveSel(string codGroup)
|
|
{
|
|
SelCodGroup = codGroup;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |