示例#1
0
        public ActionResult AddCourse()
        {
            var dList = new Department();
            var sList = new Semester();

            //dList.DepartmentList = _courseRepository.AllDepartment().ToList();
            //sList.SemesterList = _courseRepository.AllSemester().ToList();

            //ViewBag.dl = new SelectList(_courseRepository.AllDepartment().ToList(), "Name", "Id");
            //ViewBag.sl = new SelectList(_courseRepository.AllSemester().ToList(), "SemesterName", "Id");
            ViewBag.dl = _courseRepository.AllDepartment().ToList();
            ViewBag.sl = _courseRepository.AllSemester().ToList();
            ViewBag.Sm = TempData["Sm"];
            ViewBag.Em = TempData["Em"];
            return(View());
        }