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