56 lines
2.4 KiB
C#
56 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using ULA.Cathay.CreditoModel.Credito;
|
|
using System.Data.Entity;
|
|
using Ultimus.Utilitarios;
|
|
|
|
namespace ULA.Cathay.CreditoModel.DAL.Credito
|
|
{
|
|
|
|
|
|
public class DocumentosFormalizacionDAL
|
|
{
|
|
private UltimusLogs logger = new UltimusLogs("DocumentosFormalizacionDAL");
|
|
|
|
private string _IDLogger;
|
|
public string IDLogger;
|
|
public CreditoContex db = new CreditoContex();
|
|
|
|
#region Obtener
|
|
|
|
public List<DocumentosFormalizacion> Obtener(int? IdTipoCategoria, int? IdTipoFacilidad, bool? ConGarantiaReal, bool? EsLinea, bool? EsEspecifico, int IdProceso, int? IdEtpa = null)
|
|
{
|
|
List<DocumentosFormalizacion> listaDocumentosFormalizacion = null;
|
|
|
|
try
|
|
{
|
|
listaDocumentosFormalizacion = new List<DocumentosFormalizacion>();
|
|
|
|
|
|
listaDocumentosFormalizacion = db.DocumentosFormalizacion
|
|
.Include(e => e.TipoFacilidad)
|
|
.Include(e => e.TipoDocumento)
|
|
.Where(e => (e.IdTipoCategoria == IdTipoCategoria || (e.IdTipoCategoria == null) || (IdTipoCategoria == null))
|
|
&& ((e.IdTipoFacilidad == IdTipoFacilidad) || (e.IdTipoFacilidad == null) || (IdTipoFacilidad == null))
|
|
&& ((e.ConGarantiaReal == ConGarantiaReal) || (e.ConGarantiaReal == null) || (ConGarantiaReal == null))
|
|
&& ((e.EsLinea == EsLinea) || (e.EsLinea == null) || (EsLinea == null))
|
|
&& ((e.EsEspecifico == EsEspecifico) || (e.EsEspecifico == null) || (EsEspecifico == null))
|
|
&& ((IdProceso == null) || (e.IdProceso == IdProceso))
|
|
&&((e.IdEtapa ==IdEtpa) || (e.IdEtapa == null) || (IdEtpa == null))
|
|
&& e.Estado == true).ToList();
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
logger.Error(IDLogger + " Error : Obtener " + "=" + ex.Message + ex.StackTrace);
|
|
}
|
|
return listaDocumentosFormalizacion;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|
|
|