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()); }
public Usuario FindById(object clave) { using (PrestamosContext db = new PrestamosContext()) { return(db.Usuarios.Find((string)clave)); } }
public IEnumerable <Usuario> FindAll() { using (PrestamosContext db = new PrestamosContext()) { return(db.Usuarios.ToList()); } }
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); } }
public IngresosEgresosController(PrestamosContext context, IMapper mapper, IServiceIngresoEgreso ServiceIngresosEgresos) { _context = context; _mapper = mapper; _ServiceIngresosEgresos = ServiceIngresosEgresos; }
public PrestamosController(PrestamosContext context) { _context = context; }
public PrestamoController(PrestamosContext context, IMapper mapper, IPrestamos ServicePrestamos) { _context = context; _mapper = mapper; _ServicePrestamos = ServicePrestamos; }
public ComDirDireccionController(PrestamosContext context) { _context = context; }
public ServiceIngresoEgreso(PrestamosContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public UsuUsuarioController(PrestamosContext context) { _context = context; }
/// <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; }
public VenArticuloPrestamoController(PrestamosContext context) { _context = context; }
public AbonosViewModels(PrestamosContext context, int IdPrestamo) { _context = context; this.IdPrestamo = IdPrestamo; }
public ComPersonaController(PrestamosContext context) { _context = context; }
public PrePlantillaPagosController(PrestamosContext context) { _context = context; }
public ClienteController(PrestamosContext context, IMapper mapper) { this.context = context; this.mapper = mapper; }
public EmpEmpleadoController(PrestamosContext context) { _context = context; }
public CliClienteController(PrestamosContext context) { _context = context; }
public PreSolicitudPrestamoController(PrestamosContext context) { _context = context; }