@using Shared.DTOs @context.ID @context.CODID @context.sstt @context.mu @context.am @context.fee @context.vra @context.vam @context.dis @* @context.adis *@ @context.tsstam @code { [Parameter] public int InvoiceID { get; set; } [Parameter] public EventCallback OnMultipleOfThree { get; set; } [Parameter] public IEnumerable InvoiceItems { get; set; } private Modal modal = default!; private async Task> DataProvider(GridDataProviderRequest 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 args) { var parameters = new Dictionary(); parameters.Add("itemDTO", args.Item); parameters.Add("InvoiceID", InvoiceID); parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack)); await modal.ShowAsync(title: "ویرایش اطلاعات", parameters: parameters); } public async Task CallBack(ActionInResultComponent result) { string msg = ""; if (result.Action == ComponentAction.add) { if (result.Status == ComponentStatus.success) msg="آیتم جدید با موفقیت اضافه شد"; } else if (result.Action == ComponentAction.update) { if (result.Status == ComponentStatus.success) msg="اطلاعات آیتم با موفقیت ویرایش شد"; } else if (result.Action == ComponentAction.delete) { if (result.Status == ComponentStatus.success) msg="آیتم با موفقیت حذف شد"; } // if (result.Status == ComponentStatus.success) // await LoadCod(1); await modal.HideAsync(); } private IEnumerable GetInvoiceItems() { return new List(); } }