public ActionResult DeleteConfirmed(int id) { ObjetoValores objetovalores = db.ObjetosValores.Find(id); db.ObjetosValores.Remove(objetovalores); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /ObjVal/Delete/5 public ActionResult Delete(int id = 0) { ObjetoValores objetovalores = db.ObjetosValores.Find(id); if (objetovalores == null) { return(HttpNotFound()); } return(View(objetovalores)); }
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)); }
// // 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)); }
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)); }