Example #1
0
        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"));
        }
Example #2
0
 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));
 }
Example #3
0
        // 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));
        }
Example #4
0
        // 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));
        }