Exemple #1
0
        public ActionResult Reporte()
        {
            List <Planilla> planillas = PlanillaRepository.getPlanillas(HttpContext.Session["institucion"].ToString());

            ViewBag.Planillas = planillas;
            return(View());
        }
Exemple #2
0
        public ActionResult ReportePDF(string idPlanilla)
        {
            List <ProgramaEstudio> lista = PlanillaRepository.getProgramaEstudio(idPlanilla);

            ProgramaEstudioReport rpt = new ProgramaEstudioReport();

            rpt.Load();
            rpt.SetDataSource(lista);
            Stream s = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);


            return(File(s, "application/pdf"));
        }
Exemple #3
0
        public ActionResult Editar(Planilla planilla)
        {
            planilla.InstitucionID = Convert.ToInt64(HttpContext.Session["institucion"].ToString());
            var mensaje = PlanillaRepository.updatePlanilla(planilla);

            if (mensaje == "OK")
            {
                ViewBag.mensaje = "La carga se editó exitosamente.";
            }
            else
            {
                ViewBag.error = mensaje;
            }

            return(RedirectToAction("Index"));
        }
Exemple #4
0
        public ActionResult Eliminar(Planilla planilla)
        {
            var mensaje = PlanillaRepository.deletePlanilla(planilla.ID);

            if (mensaje == "OK")
            {
                ViewBag.mensaje = "La" +
                                  " planilla se eliminó exitosamente.";
            }
            else
            {
                ViewBag.error = mensaje;
            }

            return(RedirectToAction("Index"));
        }
Exemple #5
0
        public ActionResult Crear(Planilla planilla)
        {
            planilla.InstitucionID = Convert.ToInt64(HttpContext.Session["institucion"].ToString());
            var mensaje = PlanillaRepository.createPlanilla(planilla);

            if (mensaje == "OK")
            {
                ViewBag.mensaje = "La carga se realizó exitosamente.";
            }
            else
            {
                ViewBag.error = mensaje;
            }

            ViewBag.materias = ObtenerMateriasSelect(planilla.MateriaID.ToString());
            ViewBag.docentes = ObtenerDocentesSelect(planilla.DocenteID.ToString());
            ViewBag.cursos   = ObtenerCursosSelect(planilla.CursoID.ToString());

            return(View());
        }
Exemple #6
0
 public PlanillaBusiness()
 {
     planillaRepository = PlanillaRepository.GetInstancia();
 }
Exemple #7
0
        public List <SelectListItem> ObtenerPlanillasSelect(string id)
        {
            var result = PlanillaRepository.getPlanillasSelect2(HttpContext.Session["institucion"].ToString(), id);

            return(result);
        }