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,5 +1,6 @@ | ||||
| using Dapper; | ||||
| using GestionIntegral.Api.Data.Repositories.Impresion; | ||||
| using GestionIntegral.Api.Dtos.Impresion; | ||||
| using GestionIntegral.Api.Models.Impresion; | ||||
| using Microsoft.Extensions.Logging; | ||||
| using System.Collections.Generic; | ||||
| @@ -45,6 +46,25 @@ namespace GestionIntegral.Api.Data.Repositories.Impresion | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public async Task<IEnumerable<EstadoBobinaDropdownDto>> GetAllDropdownAsync() | ||||
|         { | ||||
|             var sqlBuilder = new StringBuilder("SELECT Id_EstadoBobina AS IdEstadoBobina, Denominacion FROM dbo.bob_dtEstadosBobinas WHERE 1=1"); | ||||
|             var parameters = new DynamicParameters(); | ||||
|  | ||||
|             sqlBuilder.Append(" ORDER BY Denominacion;"); | ||||
|  | ||||
|             try | ||||
|             { | ||||
|                 using var connection = _connectionFactory.CreateConnection(); | ||||
|                 return await connection.QueryAsync<EstadoBobinaDropdownDto>(sqlBuilder.ToString(), parameters); | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 _logger.LogError(ex, "Error al obtener todos los Estados de Bobina."); | ||||
|                 return Enumerable.Empty<EstadoBobinaDropdownDto>(); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public async Task<EstadoBobina?> GetByIdAsync(int id) | ||||
|         { | ||||
|             const string sql = "SELECT Id_EstadoBobina AS IdEstadoBobina, Denominacion, Obs FROM dbo.bob_dtEstadosBobinas WHERE Id_EstadoBobina = @Id"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user