// GET: Prestamo
        public ActionResult Listar()
        {
            PrestamoViewModel pvm = new PrestamoViewModel();

            pvm.lista = PrestamoService.findAll();
            return(View(pvm));
        }
        public ActionResult PrestamoPorLibro(String titulo)
        {
            PrestamoViewModel pvm = new PrestamoViewModel();

            pvm.lista = PrestamoService.findByTitulo(titulo);
            return(View(pvm));
        }
        public ActionResult PrestamoPorDNI(int numeroDocumento)
        {
            PrestamoViewModel pvm = new PrestamoViewModel();

            pvm.lista = PrestamoService.findByNumeroDocumento(numeroDocumento);
            return(View(pvm));
        }
Example #4
0
 public EjemplarController()
 {
     eS  = new EjemplarServiceImp();
     lS  = new LibroServiceImp();
     aS  = new AutorServiceImp();
     edS = new EditorialServiceImp();
     pS  = new PrestamoServiceImp();
     uS  = new UsuarioServiceImp();
 }
 public ActionResult NuevoPrestamo(PrestamoViewModel pvm)
 {
     if (ModelState.IsValid)
     {
         PrestamoService.add(pvm);
         return(RedirectToAction("Listar"));
     }
     return(View(PrestamoService.getFormData()));
 }
Example #6
0
        private void FrmFinalizarPrestamo_Load(object sender, EventArgs e)
        {
            errorProvider.BlinkStyle = ErrorBlinkStyle.NeverBlink;
            oErrorProviderExtension  = new ErrorProviderExtension(errorProvider);


            oPersonaService  = new PersonaService();
            oEquipoService   = new EquipoService();
            oPrestamoService = new PrestamoService();

            cargarCombos();
        }
        public ActionResult Modificar(int prestamoId)
        {
            PrestamoViewModel pvm    = PrestamoService.getFormData();
            PrestamoViewModel pvmMod = PrestamoService.findById(prestamoId);

            pvm.LibroId             = pvmMod.LibroId;
            pvm.UsuarioId           = pvmMod.UsuarioId;
            pvm.fechaPrestamoString = pvmMod.fechaPrestamoString;
            pvm.fechaDevolucionReal = pvmMod.fechaDevolucionReal;
            pvm.fechaDevolucionTope = pvmMod.fechaDevolucionTope;
            return(View(pvm));
        }
Example #8
0
 public ABMPrestamos()
 {
     InitializeComponent();
     oEstadoDetallePrestamoService = new EstadoDetallePrestamoService();
     oDetallePrestamoService       = new DetallePrestamoService();
     oPrestamoService       = new PrestamoService();
     oEstadoPrestamoService = new EstadoPrestamoService();
     oLibroService          = new LibroService();
     oSoporteForm           = new SoporteForm();
     oPrestamoSelected      = new Prestamo();
     oEjemplarService       = new EjemplarService();
 }
Example #9
0
        private void FrmInicioPrestamos_Load(object sender, EventArgs e)
        {
            errorProvider.BlinkStyle = ErrorBlinkStyle.NeverBlink;
            oErrorProviderExtension  = new ErrorProviderExtension(errorProvider);
            formMode = FormMode.noSeleccionado;

            oPersonaService  = new PersonaService();
            oEquipoService   = new EquipoService();
            oPrestamoService = new PrestamoService();

            cargarCombos();
            setTextBoxLimits();
            habilitarCampos();
        }
Example #10
0
 public UsuarioController()
 {
     uS = new UsuarioServiceImp();
     pS = new PrestamoServiceImp();
 }
Example #11
0
 public EjemplarRepositoryImp()
 {
     pS = new PrestamoServiceImp();
 }
Example #12
0
 public PrestamoController()
 {
     pS = new PrestamoServiceImp();
     uS = new UsuarioServiceImp();
     eS = new EjemplarServiceImp();
 }
 public ActionResult Devolver(int prestamoId)
 {
     PrestamoService.devolver(prestamoId);
     return(volverAlListadoNoDevueltos());
 }
 public ActionResult Modificar(PrestamoViewModel pvm)
 {
     pvm.fechaDevolucionTope = pvm.fechaPrestamo.AddDays(Prestamo.DIAS_PRESTAMO);
     PrestamoService.update(pvm);
     return(volverAlListado());
 }
        public ActionResult NuevoPrestamo()
        {
            PrestamoViewModel pvm = PrestamoService.getFormData();

            return(View(pvm));
        }