public ActionResult DeleteConfirmed(int id) { Pupilentes pupilentes = db.Pupilentes.Find(id); db.Pupilentes.Remove(pupilentes); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Modelo,Color,Costo,TamañoPupila,TamañoDiametro,PrecioVenta,Imagen")] Pupilentes pupilentes) { if (ModelState.IsValid) { db.Entry(pupilentes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pupilentes)); }
public ActionResult Create([Bind(Include = "Id,Modelo,Color,Costo,TamañoPupila,TamañoDiametro,PrecioVenta,Imagen")] Pupilentes pupilentes) { if (ModelState.IsValid) { db.Pupilentes.Add(pupilentes); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pupilentes)); }
// GET: Pupilentes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Pupilentes pupilentes = db.Pupilentes.Find(id); if (pupilentes == null) { return(HttpNotFound()); } return(View(pupilentes)); }