Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            MOBDATA mOBDATA = db.MOBDATAs.Find(id);

            db.MOBDATAs.Remove(mOBDATA);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 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));
 }
Exemple #3
0
        // 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));
        }
Exemple #4
0
        // 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));
        }