public ActionResult DeleteConfirmed(int id) { insumos insumos = db.insumos.Find(id); db.insumos.Remove(insumos); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id_insumos,codigo,nombre,descripcion")] insumos insumos) { if (ModelState.IsValid) { db.Entry(insumos).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(insumos)); }
public ActionResult Edit([Bind(Include = "Handle,Produto,Descricao,Quantidade,DataCompra")] insumos insumos) { if (ModelState.IsValid) { db.Entry(insumos).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(insumos)); }
public ActionResult Create([Bind(Include = "Id_insumos,codigo,nombre,descripcion")] insumos insumos) { if (ModelState.IsValid) { db.insumos.Add(insumos); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(insumos)); }
public ActionResult Create([Bind(Include = "Handle,Produto,Descricao,Quantidade,DataCompra")] insumos insumos) { if (ModelState.IsValid) { db.insumos.Add(insumos); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(insumos)); }
// GET: insumos/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } insumos insumos = db.insumos.Find(id); if (insumos == null) { return(HttpNotFound()); } return(View(insumos)); }