public ActionResult AddAnnualCourse(AnnualCourse ac)
        {
            if (ModelState.IsValid)
            {
                if (ac.academicYear >= DateTime.Now.Year)
                {
                    db.sp_InsertAnnualCourse(ac.academicYear, ac.courseId);
                    db.SaveChanges();
                    int lastID = db.AnnualCourses.Max(a => a.annualCourseId);
                    insertDumyData(lastID);
                    return RedirectToAction("ViewAllAnnualCourse");
                }
                else
                    ModelState.AddModelError("academicYear", "Academic year must be date in present or future !");
            }

            ViewBag.roles = new SelectList((from s in db.Courses
                select new
                {
                    courseId = s.courseId,
                    courseName = s.courseName + "-" + s.Faculty.facultyName 
                }), "courseId","courseName",ac.courseId);

            //ViewBag.roles = new SelectList(db.Courses, "courseId", "courseName", ac.courseId);
            return View(ac);
        }
        public ActionResult EditAnnualCourse(AnnualCourse edit)
        {
            if (ModelState.IsValid)
            {
                AnnualCourse course = db.AnnualCourses.SingleOrDefault(ac => ac.annualCourseId == edit.annualCourseId);
                db.Entry(course).CurrentValues.SetValues(edit);
                db.SaveChanges();

                return RedirectToAction("ViewAllAnnualCourse");
            }
            ViewBag.state = new SelectList(getListStatus(), "Value", "Text", edit.Status);
            ViewBag.roles = new SelectList(db.Courses, "courseId", "courseName", edit.courseId);
            return View(edit);
        }