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