예제 #1
0
        //
        // GET: /Perfil/
        public ActionResult Manage(string cedula, string FechaInicio = "", string FechaFin = "")
        {
            var result = new PerfilViewModel();

            manager = new EmpleadoManager();
            InversionManager        inversiones         = new InversionManager();
            InversionDetalleManager inversionesDetalles = new InversionDetalleManager();
            PrestamosManager        prestamos           = new PrestamosManager();
            SolicitudManager        solicitud           = new SolicitudManager();

            try
            {
                bussinessInfo();
                result.empleado             = manager.GetBy(cedula);
                result.inversiones          = inversiones.GetInversion(cedula);
                result.inversiones_detalles = inversionesDetalles.GetInversionDetalle(cedula, FechaInicio, FechaFin);
                result.Prestamos            = prestamos.GetByAccionistaLoan(cedula, FechaInicio, FechaFin);
                // Solicitudes aprobadas
                result.SolicitudAprobadas = solicitud.GetAccionista(cedula, 3, FechaInicio, FechaFin);
                // Solicitudes aprobadas
                result.SolicitudPendiente = solicitud.GetAccionista(cedula, 1, FechaInicio, FechaFin);
            }
            catch (Exception ex)
            {
                Set_Message("Ha Ocurrido Un Error: " + ex.Message);
            }
            return(View(result));
        }
예제 #2
0
        public ActionResult Get(string Id_Rol, string partial_view)
        {
            InversionManager managerInvestment = new InversionManager();

            var result = managerInvestment.GetInversion(Id_Rol);

            result.Cedula = Id_Rol;
            return(PartialView(partial_view, result));
        }
예제 #3
0
        public ActionResult GetInvestmentAcc(string cedula)
        {
            InversionManager managerInvestment = new InversionManager();

            initiateDropDown();
            bussinessInfo();
            var result = managerInvestment.GetInversion(cedula);

            result.Cedula = cedula;
            return(Json(result, JsonRequestBehavior.AllowGet));;
        }
예제 #4
0
        public ActionResult Add(string Cedula, double Monto, int Tipo_Trans, string Comentario)
        {
            InversionManager managerInvestment = new InversionManager();

            initiateDropDown();
            bussinessInfo();
            managerInvestment.SetInversion(Cedula, Monto, Tipo_Trans, 0, Comentario);
            var result = managerInvestment.GetInversion(Cedula);

            return(View(result));
        }
예제 #5
0
        public ActionResult GetInvestment(string cedula, string view)
        {
            InversionManager managerInvestment = new InversionManager();

            initiateDropDown();
            bussinessInfo();
            var result = managerInvestment.GetInversion(cedula);

            result.Cedula = cedula;
            return(View(view, result));
        }
예제 #6
0
        public ActionResult Modify(Inversion inversion)
        {
            try
            {
                InversionManager managerInvestment = new InversionManager();
                managerInvestment.SetGanancias(inversion.Cedula, inversion.Monto_Ganancia, inversion.tipo_trans);
                var result = managerInvestment.GetInversion(Cedula);

                ViewBag.Success = "Datos Actualizados Satisfactoriamente";
                return(Content("Datos Actualizados Satisfactoriamente"));
            }
            catch (Exception ex)
            {
                ViewBag.Error = ex.Message;
            }

            return(Content(ViewBag.Error));
        }