Exemplo n.º 1
0
        public void SetCourseViewBag(long?selectedId = null)
        {
            var dao = new DepartmentDao();

            ViewBag.DepartmentID = new SelectList(dao.ListAll(), "Id", "DepartmentName", selectedId);
            var fac = new FacultyDao();

            ViewBag.FacultyID = new SelectList(fac.ListAll(), "Id", "FirstName", selectedId);
            var cou = new CourseDao();

            ViewBag.ID = new SelectList(cou.ListAll(), "Id", "CourseName", selectedId);
        }
Exemplo n.º 2
0
        //public void SetViewBag(long? selectedId = null)
        //{
        //    var dao = new UserDao();
        //    ViewBag.UserBy = new SelectList(dao.ListAll(), "UserName", "Name", selectedId);

        //}

        public void SetViewBag1(long?selectedId = null)
        {
            var dao = new CourseDao();

            ViewBag.CourseName = new SelectList(dao.ListAll(), "Name", "Name", selectedId);
        }
Exemplo n.º 3
0
        public void SetStudentViewBag(int?selectedId = null)
        {
            var dao = new CourseDao();

            ViewBag.CourseID = new SelectList(dao.ListAll(), "Id", "CourseName", selectedId);
        }