Ejemplo n.º 1
0
        // GET: Categorias
        public ActionResult Index()
        {
            TemasBLL    oBLL  = new TemasBLL();
            List <Tema> temas = oBLL.RetrieveAll();

            return(View(temas));
        }
Ejemplo n.º 2
0
        public ActionResult BuscarPreguntas()
        {
            TemasBLL    obBLL = new TemasBLL();
            List <Tema> temas = obBLL.RetrieveAll();

            ViewBag.TemaID = new SelectList(temas, "TemaID", "NombreTema");
            return(View());
        }
Ejemplo n.º 3
0
        public ActionResult Create()
        {
            TemasBLL    temasBLL = new TemasBLL();
            List <Tema> temas    = temasBLL.RetrieveAll();

            ViewBag.TemaID = new SelectList(temas, "TemaID", "NombreTema");
            PreguntasBLL    preguntaBLL = new PreguntasBLL();
            List <Pregunta> preguntas   = preguntaBLL.RetrieveAll();

            ViewBag.PreguntaID = new SelectList(preguntas, "PreguntaID", "TituloPregunta");
            return(View());
        }
Ejemplo n.º 4
0
        public ActionResult CreateSelect()
        {
            TemasBLL              mBLL       = new TemasBLL();
            List <Tema>           tema       = mBLL.RetrieveAll();
            List <SelectListItem> listSelect = new List <SelectListItem>();

            foreach (var tem in tema)
            {
                SelectListItem selectListItem = new SelectListItem()
                {
                    Text     = tem.NombreTema,
                    Value    = tem.TemaID.ToString(),
                    Selected = tem.IsSelected
                };
                listSelect.Add(selectListItem);
            }

            VMPregunta vMPregunta = new VMPregunta();

            vMPregunta.Temas = listSelect;
            return(PartialView("_Select", vMPregunta));
        }