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