Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CurrentClassOffering currentClassOffering = db.CurrentClassOfferings.Find(id);

            db.CurrentClassOfferings.Remove(currentClassOffering);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "CurrentClassOfferingID,CID,Quarter,Year,timeOffered")] CurrentClassOffering currentClassOffering)
 {
     if (ModelState.IsValid)
     {
         db.Entry(currentClassOffering).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CID = new SelectList(db.ClassOfferings, "ClassOfferingID", "CourseCode", currentClassOffering.CID);
     return(View(currentClassOffering));
 }
Esempio n. 3
0
        // GET: CurrentClassOfferings/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CurrentClassOffering currentClassOffering = db.CurrentClassOfferings.Find(id);

            if (currentClassOffering == null)
            {
                return(HttpNotFound());
            }
            return(View(currentClassOffering));
        }
Esempio n. 4
0
        // GET: CurrentClassOfferings/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CurrentClassOffering currentClassOffering = db.CurrentClassOfferings.Find(id);

            if (currentClassOffering == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CID = new SelectList(db.ClassOfferings, "ClassOfferingID", "CourseCode", currentClassOffering.CID);
            return(View(currentClassOffering));
        }