public ActionResult Create(AVAILABLE_COURSE available_course)
        {
            //reset the id
            if (ModelState.ContainsKey("AVAIL_COURSE_ID"))
                ModelState["AVAIL_COURSE_ID"].Errors.Clear();

            if (ModelState.IsValid)
            {
                db.AVAILABLE_COURSE.Add(available_course);
                db.SaveChanges();
                TempData["notice"] = "New Campus Faculty Course Has Been Successfully Linked!";
                return RedirectToAction("Index");
            }

            ViewBag.CAMPUS_ID = new SelectList(db.CAMPUS_TABLE, "CAMPUS_ID", "CAMPUS_NAME", available_course.CAMPUS_ID);
            ViewBag.COURSE_ID = new SelectList(db.COURSE_TABLE, "COURSE_ID", "COURSE_NAME", available_course.COURSE_ID);
            ViewBag.FACULTY_ID = new SelectList(db.FACULTY_TABLE, "FACULTY_ID", "FACULTY_NAME", available_course.FACULTY_ID);
            return View(available_course);
        }
 public ActionResult Edit(AVAILABLE_COURSE available_course)
 {
     if (ModelState.IsValid)
     {
         db.Entry(available_course).State = EntityState.Modified;
         db.SaveChanges();
         TempData["notice"] = "The Campus Faculty Course Link Has Been Successfully Altered!";
         return RedirectToAction("Index");
     }
     ViewBag.CAMPUS_ID = new SelectList(db.CAMPUS_TABLE, "CAMPUS_ID", "CAMPUS_NAME", available_course.CAMPUS_ID);
     ViewBag.COURSE_ID = new SelectList(db.COURSE_TABLE, "COURSE_ID", "COURSE_NAME", available_course.COURSE_ID);
     ViewBag.FACULTY_ID = new SelectList(db.FACULTY_TABLE, "FACULTY_ID", "FACULTY_NAME", available_course.FACULTY_ID);
     return View(available_course);
 }