Some checks failed
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Failing after 15m47s
35 lines
965 B
C#
35 lines
965 B
C#
using Domain.Dtos;
|
|
using Microsoft.JSInterop;
|
|
using System.Net.Http.Json;
|
|
|
|
namespace phronCare.UIBlazor.Services.Stock.Expeditions
|
|
{
|
|
public class ExpeditionService
|
|
{
|
|
private readonly IJSRuntime _js;
|
|
private readonly HttpClient _http;
|
|
public ExpeditionService(HttpClient http, IJSRuntime js)
|
|
{
|
|
_js = js;
|
|
_http = http;
|
|
}
|
|
/// <summary>
|
|
/// Obtiene un presupuesto por QuoteNumber.
|
|
/// </summary>
|
|
public async Task<QuoteDto?> GetQuoteByNumberAsync(string quoteNumber)
|
|
{
|
|
try
|
|
{
|
|
var result = await _http.GetFromJsonAsync<QuoteDto?>($"api/quote/summary/{quoteNumber}");
|
|
return result;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine($"Error al obtener QuoteDto por QuoteNumber: {ex.Message}");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|