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); }
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); }