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