示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ObjetoValores objetovalores = db.ObjetosValores.Find(id);

            db.ObjetosValores.Remove(objetovalores);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
        //
        // GET: /ObjVal/Delete/5

        public ActionResult Delete(int id = 0)
        {
            ObjetoValores objetovalores = db.ObjetosValores.Find(id);

            if (objetovalores == null)
            {
                return(HttpNotFound());
            }
            return(View(objetovalores));
        }
示例#3
0
 public ActionResult Edit(ObjetoValores objetovalores)
 {
     if (ModelState.IsValid)
     {
         db.Entry(objetovalores).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Oid = new SelectList(db.Objetos, "Oid", "Nombre", objetovalores.Oid);
     return(View(objetovalores));
 }
示例#4
0
        //
        // GET: /ObjVal/Edit/5

        public ActionResult Edit(int id = 0)
        {
            ObjetoValores objetovalores = db.ObjetosValores.Find(id);

            if (objetovalores == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Oid = new SelectList(db.Objetos, "Oid", "Nombre", objetovalores.Oid);
            return(View(objetovalores));
        }
示例#5
0
        public ActionResult Create(ObjetoValores objetovalores)
        {
            if (ModelState.IsValid)
            {
                db.ObjetosValores.Add(objetovalores);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Oid = new SelectList(db.Objetos, "Oid", "Nombre", objetovalores.Oid);
            return(View(objetovalores));
        }