public ActionResult DeleteConfirmed(int id) { atributo atributo = db.atributo.Find(id); db.atributo.Remove(atributo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idatributo,nombre,tipo_dato_fk,es_requerido")] atributo atributo) { if (ModelState.IsValid) { db.Entry(atributo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.tipo_dato_fk = new SelectList(db.tipo_dato, "idtipo_dato", "nombre", atributo.tipo_dato_fk); return(View(atributo)); }
// GET: atributos/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } atributo atributo = db.atributo.Find(id); if (atributo == null) { return(HttpNotFound()); } return(View(atributo)); }
// GET: atributos/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } atributo atributo = db.atributo.Find(id); if (atributo == null) { return(HttpNotFound()); } ViewBag.tipo_dato_fk = new SelectList(db.tipo_dato, "idtipo_dato", "nombre", atributo.tipo_dato_fk); return(View(atributo)); }