GetExpersCompany

GetGroupsCompany
This commit is contained in:
mmrbnjd
2025-07-25 21:29:57 +03:30
parent d4c4bb2ffd
commit 29107ce9c6
10 changed files with 88 additions and 42 deletions

View File

@@ -35,7 +35,7 @@ AllowRowClick=true>
@context.FullName
</GridColumn>
<GridColumn HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center" TItem="Read_ExperDto" HeaderText="وضعیت">
<Switch Value="@context.Available" ValueExpression="() => context.Available" ValueChanged="async(v)=>await SwitchChanged(context,v)" />
@@ -55,20 +55,25 @@ AllowRowClick=true>
Dictionary<string, object> parameters = new Dictionary<string, object>();
Grid<Read_ExperDto> grid = default!;
public List<Read_ExperDto> list = new();
private Modal modal = default!;
string title = "کارشناس جدید";
protected override async Task OnInitializedAsync()
{
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack));
if (await localStorageService.GetItem<string>("Role")!= "Company" )
if (await localStorageService.GetItem<string>("C/Role")!= "Company" )
navigationManager.NavigateTo("/NotFound");
await base.OnInitializedAsync();
}
private async Task<GridDataProviderResult<Read_ExperDto>> DataProvider(GridDataProviderRequest<Read_ExperDto> request)
{
var employees = await userService.GetExpersCompany(0, request.PageNumber, request.PageSize);
return await Task.FromResult(request.ApplyTo(employees != null ? employees : new()));
if (list.Count <= 0)
list = await userService.GetExpersCompany();
int skip = (request.PageNumber - 1) * request.PageSize;
return await Task.FromResult(request.ApplyTo(list != null ? list.Skip(skip).Take(request.PageSize).ToList() : new()));
}
async Task CallBack()
{