public ActionResult CourseAssign(CourseAssign aCourseAssign)
 {
     ViewBag.Departments = aCourseAssignManager.GetAllDepartments();
     ViewBag.Teachers    = aCourseAssignManager.GetAllTeachers();
     ViewBag.Message     = aCourseAssignManager.AssignCourse(aCourseAssign);
     return(View());
 }
        public ActionResult CourseAssign(CourseAssignTeacher courseAssignTeacher)
        {
            string message = courseAssignManager.AssignCourse(courseAssignTeacher);

            ViewBag.Message     = message;
            ViewBag.Departments = departmentManager.GetAllDepartmentForDropDown();
            ViewBag.Courses     = courseManager.GetAllCourseForDropDown();
            return(View());
        }
        public ActionResult Create(CourseAssign courseassign)
        {
            if (ModelState.IsValid)
            {
                //db.CourseAssigns.Add(courseassign);
                //db.SaveChanges();
                ViewBag.Msg          = courseAssignManager.AssignCourse(courseassign);
                ViewBag.DepartmentId = new SelectList(db.Departments, "Id", "Code", courseassign.DepartmentId);
                return(RedirectToAction("Create"));
            }


            ViewBag.DepartmentId = new SelectList(db.Departments, "Id", "Code", courseassign.DepartmentId);

            return(View(courseassign));
        }