public ActionResult DeleteConfirmed(int id) { MX7899 mX7899 = db.MX7899.Find(id); db.MX7899.Remove(mX7899); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Nombre,Precio,Valor,Movimiento")] MX7899 mX7899) { if (ModelState.IsValid) { db.Entry(mX7899).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(mX7899)); }
public ActionResult Create([Bind(Include = "ID,Nombre,Precio,Valor,Movimiento")] MX7899 mX7899) { if (ModelState.IsValid) { db.MX7899.Add(mX7899); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(mX7899)); }
// GET: MX7899/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MX7899 mX7899 = db.MX7899.Find(id); if (mX7899 == null) { return(HttpNotFound()); } return(View(mX7899)); }