public ActionResult DeleteConfirmed(int id) { krishnarajapurm krishnarajapurm = db.krishnarajapurms.Find(id); db.krishnarajapurms.Remove(krishnarajapurm); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Train_number,Train_name,Source_stn,Dest_stn,Arrival,Depart,halt,Su,Mo,Tu,We,Th,Fr,Sa,train_priority,platform")] krishnarajapurm krishnarajapurm) { if (ModelState.IsValid) { db.Entry(krishnarajapurm).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(krishnarajapurm)); }
// GET: krishnarajapurms/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } krishnarajapurm krishnarajapurm = db.krishnarajapurms.Find(id); if (krishnarajapurm == null) { return(HttpNotFound()); } return(View(krishnarajapurm)); }