Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ShopQuest_item shopQuest_item = db.ShopQuest_item.Find(id);

            db.ShopQuest_item.Remove(shopQuest_item);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Id_Item,Id_ShopQuest,Count")] ShopQuest_item shopQuest_item)
 {
     if (ModelState.IsValid)
     {
         db.Entry(shopQuest_item).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id_Item      = new SelectList(db.Item, "Id", "barcode", shopQuest_item.Id_Item);
     ViewBag.Id_ShopQuest = new SelectList(db.ShopQuest, "Id", "Id", shopQuest_item.Id_ShopQuest);
     return(View(shopQuest_item));
 }
Ejemplo n.º 3
0
        // GET: ShopQuest_item/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ShopQuest_item shopQuest_item = db.ShopQuest_item.Find(id);

            if (shopQuest_item == null)
            {
                return(HttpNotFound());
            }
            return(View(shopQuest_item));
        }
Ejemplo n.º 4
0
        // GET: ShopQuest_item/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ShopQuest_item shopQuest_item = db.ShopQuest_item.Find(id);

            if (shopQuest_item == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id_Item      = new SelectList(db.Item, "Id", "barcode", shopQuest_item.Id_Item);
            ViewBag.Id_ShopQuest = new SelectList(db.ShopQuest, "Id", "Id", shopQuest_item.Id_ShopQuest);
            return(View(shopQuest_item));
        }