コード例 #1
0
        public ActionResult Details(int id)
        {
            PreguntasBLL oBLL     = new PreguntasBLL();
            Pregunta     pregunta = oBLL.Retrieve(id);

            return(View(pregunta));
        }
コード例 #2
0
        public ActionResult BuscarPreguntasPorTema(Tema tema)
        {
            PreguntaTemasBLL    preguntasBLL = new PreguntaTemasBLL();
            List <PreguntaTema> pregBLL      = preguntasBLL.FilterPreguntasporTema(tema.TemaID);
            List <int>          preguntasid  = new List <int>();

            foreach (var preg in pregBLL)
            {
                preguntasid.Add(preg.PreguntaID);
            }
            ;
            PreguntasBLL    oBLL      = new PreguntasBLL();
            List <Pregunta> preguntas = new List <Pregunta>();

            foreach (var item in preguntasid)
            {
                PreguntasBLL dBLL = new PreguntasBLL();
                preguntas.Add(dBLL.Retrieve(item));
            }
            ;

            return(PartialView("_BuscarPreguntasPorTema", preguntas));
        }