21 lines
748 B
C#
21 lines
748 B
C#
using SytelineSaAppEfDataModel.Dtos;
|
|
|
|
namespace OrdersManagement.Services;
|
|
|
|
public class WarehouseService
|
|
{
|
|
private readonly HttpClient _httpClient;
|
|
|
|
public WarehouseService(IHttpClientFactory httpClientFactory)
|
|
{
|
|
_httpClient = httpClientFactory.CreateClient("FaKrosnoApi");
|
|
}
|
|
|
|
public async Task<IEnumerable<MaterialTransactionDto>> GetAllClientWzsAsync(string customerNumber, int customerSequence)
|
|
{
|
|
var response = await _httpClient.GetAsync(
|
|
$"api/WzHeader/by-customer-number?customerNumber={customerNumber}&customerSequence={customerSequence}");
|
|
response.EnsureSuccessStatusCode();
|
|
return await response.Content.ReadFromJsonAsync<IEnumerable<MaterialTransactionDto>>();
|
|
}
|
|
} |