Implementación AnomalIA - Fix de dropdowns y permisos.
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 5m17s

This commit is contained in:
2025-06-30 15:26:14 -03:00
parent 95aa09d62a
commit c96d259892
59 changed files with 1430 additions and 337 deletions

View File

@@ -1,4 +1,5 @@
using Dapper;
using GestionIntegral.Api.Dtos.Distribucion;
using GestionIntegral.Api.Models.Distribucion;
using Microsoft.Extensions.Logging;
using System.Collections.Generic;
@@ -44,6 +45,21 @@ namespace GestionIntegral.Api.Data.Repositories.Distribucion
}
}
public async Task<IEnumerable<OtroDestinoDropdownDto>> GetAllDropdownAsync()
{
const string sql = "SELECT Id_Destino AS IdDestino, Nombre FROM dbo.dist_dtOtrosDestinos ORDER BY Nombre;";
try
{
using var connection = _connectionFactory.CreateConnection();
return await connection.QueryAsync<OtroDestinoDropdownDto>(sql);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error al obtener Otros Destinos para dropdown.");
return Enumerable.Empty<OtroDestinoDropdownDto>();
}
}
public async Task<OtroDestino?> GetByIdAsync(int id)
{
const string sql = "SELECT Id_Destino AS IdDestino, Nombre, Obs FROM dbo.dist_dtOtrosDestinos WHERE Id_Destino = @Id";