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