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