コード例 #1
0
        public ActionResult Reportes()
        {
            if (!this.currentUser()) { return RedirectToAction("Ingresar"); }
            if (!this.isAdministrator()) { return RedirectToAction("Index"); }
            EncuestaBL encuestaBL = new EncuestaBL();
            PeriodoBL periodoBL = new PeriodoBL();

            IList<PeriodoDTO> lperiodos = periodoBL.getPeriodos(true);

            lperiodos.Insert(0, new PeriodoDTO() { IdPeriodo = 0, Descripcion = "Seleccione un periodo" });

            return View(lperiodos);
        }
コード例 #2
0
 public ActionResult SavePeriodo(string descripcion)
 {
     if (!this.currentUser()) { return RedirectToAction("Ingresar"); }
     PeriodoBL objBL = new PeriodoBL();
     PeriodoDTO oPeriodoDTO = new PeriodoDTO();
     oPeriodoDTO.Descripcion = descripcion;
     return Json(objBL.add(oPeriodoDTO), JsonRequestBehavior.AllowGet);
 }
コード例 #3
0
 public ActionResult GetPeriodos(bool AsSelectList = false)
 {
     //if (!this.currentUser()) { return RedirectToAction("Ingresar"); }
     PeriodoBL objBL = new PeriodoBL();
     var lista = objBL.getPeriodos(true);
     if (AsSelectList)
         lista.Insert(0, new PeriodoDTO { IdPeriodo = 0, Descripcion = "Seleccione un Periodo" });
     return Json(lista, JsonRequestBehavior.AllowGet);
 }