Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ScheduledClasses scheduledClasses = db.ScheduledClasses1.Find(id);

            db.ScheduledClasses1.Remove(scheduledClasses);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ScheduledClassId,CourseId,StartDate,EndDate,InstructorName,Location,SCSID")] ScheduledClasses scheduledClasses)
 {
     if (ModelState.IsValid)
     {
         db.Entry(scheduledClasses).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CourseId = new SelectList(db.Courses, "CourseId", "CourseName", scheduledClasses.CourseId);
     ViewBag.SCSID    = new SelectList(db.ScheduledClassStatuses, "SCSID", "SCSName", scheduledClasses.SCSID);
     return(View(scheduledClasses));
 }
Ejemplo n.º 3
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ScheduledClasses scheduledClasses = db.ScheduledClasses1.Find(id);

            if (scheduledClasses == null)
            {
                return(HttpNotFound());
            }
            return(View(scheduledClasses));
        }
Ejemplo n.º 4
0
        public ActionResult Edit(int?id)

        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ScheduledClasses scheduledClasses = db.ScheduledClasses1.Find(id);

            if (scheduledClasses == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CourseId = new SelectList(db.Courses, "CourseId", "CourseName", scheduledClasses.CourseId);
            ViewBag.SCSID    = new SelectList(db.ScheduledClassStatuses, "SCSID", "SCSName", scheduledClasses.SCSID);
            return(View(scheduledClasses));
        }