public ActionResult DeleteConfirmed(int id) { ProcessadorPlacaMae processadorPlacaMae = db.ProcessadorPlacaMaes.Find(id); db.ProcessadorPlacaMaes.Remove(processadorPlacaMae); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,ProcessadorID,PlacaMaeID")] ProcessadorPlacaMae processadorPlacaMae) { if (ModelState.IsValid) { db.Entry(processadorPlacaMae).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PlacaMaeID = new SelectList(db.PlacaMaes, "Id", "Nome", processadorPlacaMae.PlacaMaeID); ViewBag.ProcessadorID = new SelectList(db.Processadors, "Id", "Nome", processadorPlacaMae.ProcessadorID); return(View(processadorPlacaMae)); }
// GET: ProcessadorPlacaMae/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessadorPlacaMae processadorPlacaMae = db.ProcessadorPlacaMaes.Find(id); if (processadorPlacaMae == null) { return(HttpNotFound()); } return(View(processadorPlacaMae)); }
// GET: ProcessadorPlacaMae/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessadorPlacaMae processadorPlacaMae = db.ProcessadorPlacaMaes.Find(id); if (processadorPlacaMae == null) { return(HttpNotFound()); } ViewBag.PlacaMaeID = new SelectList(db.PlacaMaes, "Id", "Nome", processadorPlacaMae.PlacaMaeID); ViewBag.ProcessadorID = new SelectList(db.Processadors, "Id", "Nome", processadorPlacaMae.ProcessadorID); return(View(processadorPlacaMae)); }