Ejemplo n.º 1
0
        // GET: Teacher/QAndEBankTeacher
        //Display List subject teaching
        public ActionResult Index()
        {
            SubjectDAO     subjectDAO = new SubjectDAO();
            List <Subject> subjects   = subjectDAO.GetAllSubjects();

            return(View(subjects));
        }
Ejemplo n.º 2
0
        //Viewbag Subjects
        public void SetSubjectViewBag(int?selectedID = null)
        {
            var _sub = new SubjectDAO();

            ViewBag.SubjectsID = new SelectList(_sub.GetAllSubjects(), "Id", "Name", selectedID);
        }