public ActionResult Finalizar(int id, ProyectoMVC.Model.Prestamos elPrestamo)
        {
            try
            {
                ProyectoMVC.LogicaDeNegocios.CordinadorDePrestamos cordinadorDePrestamos = new LogicaDeNegocios.CordinadorDePrestamos();
                elPrestamo.dias            = cordinadorDePrestamos.CalcularDias(elPrestamo.fechaDeDevolucion, elPrestamo.fechaDePrestamo);
                elPrestamo.montoDePrestamo = cordinadorDePrestamos.CalcularMontoPrestamo(elPrestamo.dias);
                elPrestamo.montoACancelar  = cordinadorDePrestamos.CalcularMontoACancelar(elPrestamo.montoDePrestamo, elPrestamo.prima);
                string numeroDePlaca    = elPrestamo.placaDelVehiculo;
                string cedulaDelCliente = elPrestamo.cedulaDelCliente;
                cordinadorDePrestamos.Editar(elPrestamo);
                cordinadorDePrestamos.ColocarEnFinalizado(id);

                ProyectoMVC.LogicaDeNegocios.CordinadorDeVehiculos cordinadorDeVehiculos = new LogicaDeNegocios.CordinadorDeVehiculos();
                int idVehiculo = cordinadorDeVehiculos.ObtenerIdVehiculoPorNumeroDePlaca(numeroDePlaca);
                cordinadorDeVehiculos.ColocarEnDisponible(idVehiculo);

                ProyectoMVC.LogicaDeNegocios.CordinadorDeClientes cordinadorDeClientes = new LogicaDeNegocios.CordinadorDeClientes();
                int idCliente = cordinadorDeClientes.ObtenerIdClientePorNumeroDeCedula(cedulaDelCliente);
                cordinadorDeClientes.ColocarEnDisponible(idCliente);

                return(RedirectToAction("ListarPrestamos"));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult ListarPrestamosFinalizados(string numeroDeCedula)
        {
            ProyectoMVC.LogicaDeNegocios.CordinadorDePrestamos cordinadorDePrestamos = new LogicaDeNegocios.CordinadorDePrestamos();
            List <Model.Prestamos> laListaDePrestamos = cordinadorDePrestamos.ListarPrestamosFinalizados(numeroDeCedula);

            return(View(laListaDePrestamos));
        }
        public ActionResult Crear(ProyectoMVC.Model.Prestamos elNuevoPrestamo)
        {
            try
            {
                ProyectoMVC.LogicaDeNegocios.CordinadorDePrestamos cordinadorDePrestamos = new LogicaDeNegocios.CordinadorDePrestamos();
                elNuevoPrestamo.dias            = cordinadorDePrestamos.CalcularDias(elNuevoPrestamo.fechaDeDevolucion, elNuevoPrestamo.fechaDePrestamo);
                elNuevoPrestamo.montoDePrestamo = cordinadorDePrestamos.CalcularMontoPrestamo(elNuevoPrestamo.dias);
                elNuevoPrestamo.montoACancelar  = cordinadorDePrestamos.CalcularMontoACancelar(elNuevoPrestamo.montoDePrestamo, elNuevoPrestamo.prima);
                cordinadorDePrestamos.Agregar(elNuevoPrestamo);

                ProyectoMVC.LogicaDeNegocios.CordinadorDeVehiculos cordinadorDeVehiculos = new LogicaDeNegocios.CordinadorDeVehiculos();
                int idVehiculo = cordinadorDeVehiculos.ObtenerIdVehiculoPorNumeroDePlaca(elNuevoPrestamo.placaDelVehiculo);
                cordinadorDeVehiculos.ColocarEnPrestamo(idVehiculo);

                ProyectoMVC.LogicaDeNegocios.CordinadorDeClientes cordinadorDeClientes = new LogicaDeNegocios.CordinadorDeClientes();
                int idCliente = cordinadorDeClientes.ObtenerIdClientePorNumeroDeCedula(elNuevoPrestamo.cedulaDelCliente);
                cordinadorDeClientes.ColocarEnPrestamo(idCliente);

                return(RedirectToAction("ListarPrestamos"));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult ListarPrestamos()
        {
            ProyectoMVC.LogicaDeNegocios.CordinadorDePrestamos cordinadorDePrestamos = new LogicaDeNegocios.CordinadorDePrestamos();
            List <Model.Prestamos> laListaDePrestamos = cordinadorDePrestamos.ListarPrestamosEnProceso();

            return(View(laListaDePrestamos));
        }
        public ActionResult Finalizar(int id)
        {
            ProyectoMVC.LogicaDeNegocios.CordinadorDePrestamos cordinadorDePrestamos = new LogicaDeNegocios.CordinadorDePrestamos();
            ProyectoMVC.Model.Prestamos elPrestamo = new Model.Prestamos();
            elPrestamo = cordinadorDePrestamos.ObternerPrestamoPorId(id);

            return(View(elPrestamo));
        }