public ActionResult DeleteConfirmed(int id) { Closure_Day closure_Day = db.Closure_Days.Find(id); db.Closure_Days.Remove(closure_Day); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult ClosureDate() { Closure_Day closure = db.Closure_Days.Find( ); return(Json(closure, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit([Bind(Include = "csdID,startDay,endDay,finalDay")] Closure_Day closure_Day) { if (ModelState.IsValid) { db.Entry(closure_Day).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(closure_Day)); }
public ActionResult Create([Bind(Include = "csdID,startDay,endDay,finalDay")] Closure_Day closure_Day) { if (ModelState.IsValid) { db.Closure_Days.Add(closure_Day); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(closure_Day)); }
// GET: Closure_Day/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Closure_Day closure_Day = db.Closure_Days.Find(id); if (closure_Day == null) { return(HttpNotFound()); } return(View(closure_Day)); }