Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ItemVariable itemVariable = db.ItemVariable.Find(id);

            db.ItemVariable.Remove(itemVariable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "id,nombre,tipo,variable_item,activo")] ItemVariable itemVariable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(itemVariable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.variable_item = new SelectList(db.Variable, "id", "nombre", itemVariable.variable_item);
     return(View(itemVariable));
 }
Пример #3
0
        // GET: ItemVariable/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ItemVariable itemVariable = db.ItemVariable.Find(id);

            if (itemVariable == null)
            {
                return(HttpNotFound());
            }
            return(View(itemVariable));
        }
Пример #4
0
        // GET: ItemVariable/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ItemVariable itemVariable = db.ItemVariable.Find(id);

            if (itemVariable == null)
            {
                return(HttpNotFound());
            }
            ViewBag.variable_item = new SelectList(db.Variable, "id", "nombre", itemVariable.variable_item);
            return(View(itemVariable));
        }