public ActionResult DeleteConfirmed(string id) { DemoComplemento demoComplemento = db.DemoComplemento.Find(id); db.DemoComplemento.Remove(demoComplemento); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ComplementoCodigo,ComplementoTipo,ComplementoPrecio,ComplementoDescripcion")] DemoComplemento demoComplemento) { if (ModelState.IsValid) { db.Entry(demoComplemento).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ComplementoTipo = new SelectList(db.DemoTipoCom, "TipoCodigo", "TipoDescripcion", demoComplemento.ComplementoTipo); return(View(demoComplemento)); }
// GET: DemoComplementoes/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DemoComplemento demoComplemento = db.DemoComplemento.Find(id); if (demoComplemento == null) { return(HttpNotFound()); } return(View(demoComplemento)); }
// GET: DemoComplementoes/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DemoComplemento demoComplemento = db.DemoComplemento.Find(id); if (demoComplemento == null) { return(HttpNotFound()); } ViewBag.ComplementoTipo = new SelectList(db.DemoTipoCom, "TipoCodigo", "TipoDescripcion", demoComplemento.ComplementoTipo); return(View(demoComplemento)); }