94 lines
2.2 KiB
C#
94 lines
2.2 KiB
C#
using EgwCoreLib.Lux.Data.DbModel.Items;
|
|
using EgwCoreLib.Lux.Data.DbModel.Utils;
|
|
using EgwCoreLib.Lux.Data.Services;
|
|
using Lux.UI.Components.Compo;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace Lux.UI.Components.Pages
|
|
{
|
|
public partial class JobRoute
|
|
{
|
|
#region Protected Fields
|
|
|
|
protected List<GenClassModel> ListGenClass = new List<GenClassModel>();
|
|
|
|
#endregion Protected Fields
|
|
|
|
#region Protected Properties
|
|
|
|
protected GenValMan.FiltSelect CurrFilt { get; set; } = new GenValMan.FiltSelect();
|
|
|
|
[Inject]
|
|
protected DataLayerServices DLService { get; set; } = null!;
|
|
|
|
protected string SearchVal
|
|
{
|
|
get => CurrFilt.SearchVal;
|
|
set
|
|
{
|
|
isLoading = true;
|
|
CurrFilt.SearchVal = value;
|
|
isLoading = false;
|
|
}
|
|
}
|
|
|
|
protected string SelCodGroup
|
|
{
|
|
get => CurrFilt.SelCodGroup;
|
|
set
|
|
{
|
|
if (CurrFilt.SelCodGroup != value)
|
|
{
|
|
isLoading = true;
|
|
CurrFilt.SelCodGroup = value;
|
|
isLoading = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
isLoading = true;
|
|
await ReloadBaseData();
|
|
}
|
|
|
|
protected void ResetSearch()
|
|
{
|
|
SearchVal = "";
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private ItemModel? editRecord = null;
|
|
private bool isLoading = false;
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Methods
|
|
|
|
private async Task ForceReloadAsync()
|
|
{
|
|
await ReloadBaseData();
|
|
}
|
|
|
|
private async Task ReloadBaseData()
|
|
{
|
|
isLoading = true;
|
|
ListGenClass = await DLService.GenClassGetAllAsync();
|
|
isLoading = false;
|
|
}
|
|
|
|
private void SaveSel(string codGroup)
|
|
{
|
|
SelCodGroup = codGroup;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |