public ActionResult DeleteConfirmed(int id) { AspNetLessonPlanBreakdownHeading aspNetLessonPlanBreakdownHeading = db.AspNetLessonPlanBreakdownHeadings.Find(id); db.AspNetLessonPlanBreakdownHeadings.Remove(aspNetLessonPlanBreakdownHeading); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,BreakDownHeadingName")] AspNetLessonPlanBreakdownHeading aspNetLessonPlanBreakdownHeading) { if (ModelState.IsValid) { db.Entry(aspNetLessonPlanBreakdownHeading).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aspNetLessonPlanBreakdownHeading)); }
public ActionResult Create([Bind(Include = "Id,BreakDownHeadingName")] AspNetLessonPlanBreakdownHeading aspNetLessonPlanBreakdownHeading) { if (ModelState.IsValid) { db.AspNetLessonPlanBreakdownHeadings.Add(aspNetLessonPlanBreakdownHeading); db.SaveChanges(); return(RedirectToAction("Index", "AspNetLessonPlanBreakdownHeading")); } return(View(aspNetLessonPlanBreakdownHeading)); }
// GET: AspNetLessonPlanBreakdownHeading/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AspNetLessonPlanBreakdownHeading aspNetLessonPlanBreakdownHeading = db.AspNetLessonPlanBreakdownHeadings.Find(id); if (aspNetLessonPlanBreakdownHeading == null) { return(HttpNotFound()); } return(View(aspNetLessonPlanBreakdownHeading)); }
public ActionResult DeleteCnfm(int id) { AspNetLessonPlanBreakdownHeading aspNetLessonPlanBreakdownHeading = db.AspNetLessonPlanBreakdownHeadings.Find(id); try { db.AspNetLessonPlanBreakdownHeadings.Remove(aspNetLessonPlanBreakdownHeading); db.SaveChanges(); return(RedirectToAction("Index")); } catch { ViewBag.Error = "It can't be deleted"; return(View("Details", aspNetLessonPlanBreakdownHeading)); } }