public ActionResult DeleteConfirmed(int id) { APPROGRAM aPPROGRAM = db.APPROGRAMs.Find(id); db.APPROGRAMs.Remove(aPPROGRAM); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,PROG_NAME,SEM_CURRCULUM")] APPROGRAM aPPROGRAM) { if (ModelState.IsValid) { db.Entry(aPPROGRAM).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aPPROGRAM)); }
public ActionResult Create([Bind(Include = "ID,PROG_NAME,SEM_CURRCULUM")] APPROGRAM aPPROGRAM) { if (ModelState.IsValid) { db.APPROGRAMs.Add(aPPROGRAM); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aPPROGRAM)); }
// GET: ApPorgram/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } APPROGRAM aPPROGRAM = db.APPROGRAMs.Find(id); if (aPPROGRAM == null) { return(HttpNotFound()); } return(View(aPPROGRAM)); }