Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Course_Instractors course_Instractors = db.Course_Instractors.Find(id);

            db.Course_Instractors.Remove(course_Instractors);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID,CourseID,InstractorID,SpecificationID")] Course_Instractors course_Instractors)
 {
     if (ModelState.IsValid)
     {
         db.Entry(course_Instractors).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CourseID        = new SelectList(db.Courses, "ID", "Course_EngName", course_Instractors.CourseID);
     ViewBag.InstractorID    = new SelectList(db.Instractors, "ID", "Instractor_EngName", course_Instractors.InstractorID);
     ViewBag.SpecificationID = new SelectList(db.Specifications, "ID", "Specification_EngName", course_Instractors.SpecificationID);
     return(View(course_Instractors));
 }
Exemplo n.º 3
0
        // GET: Course_Instractors/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Course_Instractors course_Instractors = db.Course_Instractors.Find(id);

            if (course_Instractors == null)
            {
                return(HttpNotFound());
            }
            return(View(course_Instractors));
        }
Exemplo n.º 4
0
        // GET: Course_Instractors/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Course_Instractors course_Instractors = db.Course_Instractors.Find(id);

            if (course_Instractors == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CourseID        = new SelectList(db.Courses, "ID", "Course_EngName", course_Instractors.CourseID);
            ViewBag.InstractorID    = new SelectList(db.Instractors, "ID", "Instractor_EngName", course_Instractors.InstractorID);
            ViewBag.SpecificationID = new SelectList(db.Specifications, "ID", "Specification_EngName", course_Instractors.SpecificationID);
            return(View(course_Instractors));
        }