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