Genreacion de amoritzaciones obtencion de PIBE
This commit is contained in:
@@ -174,9 +174,9 @@
|
||||
// gcPrestamos.View.CommitEditing(true);
|
||||
|
||||
|
||||
var enumPibe = await Utilidades.ObtenerObjeto<List<ENUMERACIONES>>(cliente, "/api/ENUMERACIONES/EnumeracionesGrupo/NOM");
|
||||
var enumPibe = await Utilidades.ObtenerObjeto<ENUMERACIONES>(cliente, "/api/ENUMERACIONES/EnumeracionesCodigo/NOM.PIBE");
|
||||
// var pibe = enumPibe.FirstOrDefault().VALORNUMERICO1;
|
||||
var pibe = enumPibe.FirstOrDefault(x => x.CODIGO == "NOM.PIBE")?.VALORNUMERICO1;
|
||||
var pibe = enumPibe.VALORNUMERICO1;
|
||||
|
||||
|
||||
if (pibe == null)
|
||||
|
||||
@@ -42,5 +42,27 @@ namespace SwaggerAntifraude.Controllers
|
||||
return StatusCode(500, $"Error interno del servidor: {ex.Message}");
|
||||
}
|
||||
}
|
||||
[Authorize(Policy = "LecturaPolicy")]
|
||||
[HttpGet("EnumeracionesCodigo/{codigo}")]
|
||||
public async Task<IActionResult> EnumCodigo(string codigo)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false))
|
||||
{
|
||||
var enumes = context.ENUMERACIONES.Include(v => v.IDGRUPOENUMERACIONNavigation)
|
||||
.FirstOrDefault(p => p.CODIGO == codigo);
|
||||
|
||||
if (enumes == null)
|
||||
return NotFound();
|
||||
|
||||
return Ok(enumes);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return StatusCode(500, $"Error interno del servidor: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user