public ActionResult DeleteConfirmed(int id) { MOBDATA mOBDATA = db.MOBDATAs.Find(id); db.MOBDATAs.Remove(mOBDATA); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,BRAND_ID,MNAME,DES_MOBILE,PRICE,IMG")] MOBDATA mOBDATA) { if (ModelState.IsValid) { db.Entry(mOBDATA).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BRAND_ID = new SelectList(db.MOBILBRANDS, "BRAND_ID", "BRANDNAME", mOBDATA.BRAND_ID); return(View(mOBDATA)); }
// GET: MOBDATAs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MOBDATA mOBDATA = db.MOBDATAs.Find(id); if (mOBDATA == null) { return(HttpNotFound()); } return(View(mOBDATA)); }
// GET: MOBDATAs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MOBDATA mOBDATA = db.MOBDATAs.Find(id); if (mOBDATA == null) { return(HttpNotFound()); } ViewBag.BRAND_ID = new SelectList(db.MOBILBRANDS, "BRAND_ID", "BRANDNAME", mOBDATA.BRAND_ID); return(View(mOBDATA)); }