...
This commit is contained in:
66
TaxPayerFull/Layout/LGridInvoiceItem.razor
Normal file
66
TaxPayerFull/Layout/LGridInvoiceItem.razor
Normal file
@@ -0,0 +1,66 @@
|
||||
@using Shared.DTOs
|
||||
<Grid TItem="InvoiceItemDTO"
|
||||
Class="table table-hover table-bordered table-striped"
|
||||
DataProvider="DataProvider"
|
||||
AllowPaging="true"
|
||||
PageSize="10"
|
||||
OnRowClick="OnRowClick"
|
||||
Responsive="true">
|
||||
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="شناسه">
|
||||
@context.ID
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="کد">
|
||||
@context.CODID
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="کالا">
|
||||
@context.sstt
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="واحد">
|
||||
@context.mu
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="تعداد/مقدار">
|
||||
@context.am
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ واحد">
|
||||
@context.fee
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="نرخ مالیات">
|
||||
@context.vra
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ مالیات">
|
||||
@context.vam
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="تخفیف">
|
||||
@context.dis
|
||||
</GridColumn>
|
||||
@* <GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ بعد از تخفیف">
|
||||
@context.adis
|
||||
</GridColumn> *@
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ کل">
|
||||
@context.tsstam
|
||||
</GridColumn>
|
||||
</Grid>
|
||||
|
||||
|
||||
@code {
|
||||
[Inject] ModalService ModalService { get; set; } = default!;
|
||||
[Parameter] public IEnumerable<InvoiceItemDTO> InvoiceItems { get; set; }
|
||||
private async Task<GridDataProviderResult<InvoiceItemDTO>> DataProvider(GridDataProviderRequest<InvoiceItemDTO> request)
|
||||
{
|
||||
if (InvoiceItems is null) // pull employees only one time for client-side filtering, sorting, and paging
|
||||
InvoiceItems = GetInvoiceItems(); // call a service or an API to pull the employees
|
||||
|
||||
return await Task.FromResult(request.ApplyTo(InvoiceItems));
|
||||
}
|
||||
private async Task OnRowClick(GridRowEventArgs<InvoiceItemDTO> args)
|
||||
{
|
||||
await ModalService.ShowAsync(new ModalOption { Type = ModalType.Primary, Title = "Event: Row Click", Message = $"Id: {args.Item.ID}, Name: {args.Item.sstt}" });
|
||||
}
|
||||
private IEnumerable<InvoiceItemDTO> GetInvoiceItems()
|
||||
{
|
||||
return new List<InvoiceItemDTO>();
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user