This commit is contained in:
mmrbnjd
2024-09-08 17:23:33 +03:30
parent 745412ee56
commit b81c950c39
9 changed files with 468 additions and 126 deletions

View File

@@ -12,6 +12,7 @@ namespace Front
public readonly HttpClientController _hc;
private List<ForCustomerSearch>? Cus = null;
private List<IdName<int>>? Patterns = null;
private List<IdName<string>>? PaymentMethods = null;
private List<IdName<int>>? Patternsbyinp = null;
private List<IdName<int>>? BillTypes = null;
private List<IdName<int>>? UnitsbyUnitTaxID = null;
@@ -71,6 +72,20 @@ namespace Front
return Patterns;
}
public async Task<List<IdName<string>>?> GetPaymentMethods()
{
if (PaymentMethods == null)
{
var request = await _hc.Get($"InvoicePayment/PaymentMethods");
if (request.IsSuccessStatusCode)
{
PaymentMethods = await request.Content.ReadFromJsonAsync<List<IdName<string>>>();
}
}
return PaymentMethods;
}
public async Task<List<IdName<int>>?> GetPatternsbyinp()
{
if (Patternsbyinp == null)