public ActionResult DeleteConfirmed(int id) { tbl_LK_MarketList tbl_LK_MarketList = db.tbl_LK_MarketList.Find(id); db.tbl_LK_MarketList.Remove(tbl_LK_MarketList); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MarketListID,MarketListName,StateID,LgaID,MarketAddres,Longitude,Latitude,location")] tbl_LK_MarketList tbl_LK_MarketList) { if (ModelState.IsValid) { db.Entry(tbl_LK_MarketList).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LgaID = new SelectList(db.tbl_LK_Lga, "LgaID", "LgaName", tbl_LK_MarketList.LgaID); ViewBag.StateID = new SelectList(db.tbl_LK_State, "StateID", "StateName", tbl_LK_MarketList.StateID); return(View(tbl_LK_MarketList)); }
// GET: MarketList/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_LK_MarketList tbl_LK_MarketList = db.tbl_LK_MarketList.Find(id); if (tbl_LK_MarketList == null) { return(HttpNotFound()); } return(View(tbl_LK_MarketList)); }
// GET: MarketList/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_LK_MarketList tbl_LK_MarketList = db.tbl_LK_MarketList.Find(id); if (tbl_LK_MarketList == null) { return(HttpNotFound()); } ViewBag.LgaID = new SelectList(db.tbl_LK_Lga, "LgaID", "LgaName", tbl_LK_MarketList.LgaID); ViewBag.StateID = new SelectList(db.tbl_LK_State, "StateID", "StateName", tbl_LK_MarketList.StateID); return(View(tbl_LK_MarketList)); }