public IEnumerable <Proyecto> Buscar(DateTime fechaini, DateTime fechaFin, string cedula, string titulo, string descripcion, string estado, decimal?monto)
        {
            PrestamosContext db = new PrestamosContext();
            var proyectos       = from p in db.Proyectos select p;

            //if (fechaini != null && fechaFin != null)
            //{
            //    proyectos = proyectos.Where(proy => proy.fechaPresentacion >= fechaini && proy.fechaPresentacion <= fechaFin);
            //}
            if (!String.IsNullOrEmpty(cedula))
            {
                proyectos = proyectos.Where(proy => proy.solicitante.cedula.Contains(cedula));
            }
            if (!String.IsNullOrEmpty(titulo))
            {
                proyectos = proyectos.Where(proy => proy.titulo.Contains(titulo));
            }
            if (!String.IsNullOrEmpty(descripcion))
            {
                proyectos = proyectos.Where(proy => proy.descripcion.Contains(descripcion));
            }
            if (monto != 0)
            {
                proyectos = proyectos.Where(proy => proy.monto <= monto);
            }
            return(proyectos.ToList());
        }
示例#2
0
        public Usuario FindById(object clave)
        {
            using (PrestamosContext db = new PrestamosContext())

            {
                return(db.Usuarios.Find((string)clave));
            }
        }
示例#3
0
        public IEnumerable <Usuario> FindAll()

        {
            using (PrestamosContext db = new PrestamosContext())
            {
                return(db.Usuarios.ToList());
            }
        }
示例#4
0
        public bool Add(Usuario objeto)

        {
            try
            {
                if (objeto != null && objeto.Validar())
                {
                    using (PrestamosContext db = new PrestamosContext())
                    {
                        db.Usuarios.Add(objeto);
                        db.SaveChanges();
                        return(true);
                    }
                }

                return(false);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
示例#5
0
 public IngresosEgresosController(PrestamosContext context, IMapper mapper, IServiceIngresoEgreso ServiceIngresosEgresos)
 {
     _context = context;
     _mapper  = mapper;
     _ServiceIngresosEgresos = ServiceIngresosEgresos;
 }
示例#6
0
 public PrestamosController(PrestamosContext context)
 {
     _context = context;
 }
 public PrestamoController(PrestamosContext context, IMapper mapper, IPrestamos ServicePrestamos)
 {
     _context          = context;
     _mapper           = mapper;
     _ServicePrestamos = ServicePrestamos;
 }
示例#8
0
 public ComDirDireccionController(PrestamosContext context)
 {
     _context = context;
 }
 public ServiceIngresoEgreso(PrestamosContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public UsuUsuarioController(PrestamosContext context)
 {
     _context = context;
 }
示例#11
0
 /// <summary>
 ///     Constructor base inicializa dependencias
 /// </summary>
 /// <param name="context"></param>
 /// <param name="mapper"></param>
 public ServiceAbonos(PrestamosContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public FormaPagoController(PrestamosContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
示例#13
0
 public VenArticuloPrestamoController(PrestamosContext context)
 {
     _context = context;
 }
示例#14
0
 public AbonosViewModels(PrestamosContext context, int IdPrestamo)
 {
     _context        = context;
     this.IdPrestamo = IdPrestamo;
 }
 public ComPersonaController(PrestamosContext context)
 {
     _context = context;
 }
示例#16
0
 public PrePlantillaPagosController(PrestamosContext context)
 {
     _context = context;
 }
示例#17
0
 public ClienteController(PrestamosContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
 public EmpEmpleadoController(PrestamosContext context)
 {
     _context = context;
 }
示例#19
0
 public CliClienteController(PrestamosContext context)
 {
     _context = context;
 }
 public PreSolicitudPrestamoController(PrestamosContext context)
 {
     _context = context;
 }