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