Пример #1
0
        public ActionResult EditAssignedTeacher(int id, int?message)
        {
            if (message != null)
            {
                if (message == 0)
                {
                    ViewBag.Message = "Sorry! Course Assign Update Failed !!";
                }
                else if (message == 5)
                {
                    ViewBag.Message = "Sorry! Course Code Exists !!";
                }
                else if (message == 6)
                {
                    ViewBag.Message = "Sorry! Course Name Exists !!";
                }
            }

            CourseAssignManager aCourseAssignManager = new CourseAssignManager();

            ViewBag.Departments    = aCourseAssignManager.GetAllDepartments();
            ViewBag.Teachers       = aCourseAssignManager.GetAllTeachers();
            ViewBag.CourseCodeList = aCourseAssignManager.GetAllCourseCodes();


            CourseAssignToTeacherModel aCourseAssignToTeacherModel = new CourseAssignToTeacherModel();

            aCourseAssignToTeacherModel = aCourseAssignManager.GetAssignedCourseToTeacherModelById(id);



            /*ViewBag.Departments = aCourseAssignManager.GetAllDepartments();
             * ViewBag.Teachers = aCourseAssignManager.GetAllTeachers();
             * ViewBag.CourseCodeList = aCourseAssignManager.GetAllCourseCodes();*/
            return(View(aCourseAssignToTeacherModel));
        }