This commit is contained in:
mmrbnjd
2024-06-27 19:18:50 +03:30
parent 6c8aaadac3
commit a44b27b8a7
9 changed files with 109 additions and 16 deletions

View File

@@ -1,4 +1,5 @@
@page "/Invoice"
@page "/Invoice/{input}"
@using Front.Services
@using Shared
@using Shared.DTOs
@@ -130,6 +131,7 @@
return await Task.FromResult(request.ApplyTo(customers.OrderBy(customer => customer.CustomerName)));
}
//-----------
[Parameter] public string? input { get; set; }
[Inject] protected PreloadService PreloadService { get; set; } = default!;
public int? ItemSearchInvoicetype { get; set; }
ItemSerchGetInvoices itemsearch = new ItemSerchGetInvoices();
@@ -146,6 +148,15 @@
protected override async Task OnParametersSetAsync()
{
if (PageIndex == null) PageIndex = 1;
if (!string.IsNullOrEmpty(input))
{
if (input.StartsWith("cus"))
itemsearch.CustomerID = Convert.ToInt32(input.Split(':')[1]);
else if (input.StartsWith("cod"))
itemsearch.CodID =Convert.ToInt32(input.Split(':')[1]);
}
await LoadInvoice(PageIndex.Value);
await base.OnParametersSetAsync();
}