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