...
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user