Implementación AnomalIA - Fix de dropdowns y permisos.
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 5m17s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 5m17s
				
			This commit is contained in:
		| @@ -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"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user