GetExpersCompany
GetGroupsCompany
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user