public ActionResult DeleteConfirmed(int id) { enc_factura enc_factura = db.enc_factura.Find(id); db.enc_factura.Remove(enc_factura); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "no_factura,fecha,cliente,total_factura,usuario")] enc_factura enc_factura) { if (ModelState.IsValid) { db.Entry(enc_factura).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.cliente = new SelectList(db.cliente, "nit", "nombre", enc_factura.cliente); ViewBag.usuario = new SelectList(db.usuario, "id", "pass", enc_factura.usuario); return(View(enc_factura)); }
// GET: enc_factura/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } enc_factura enc_factura = db.enc_factura.Find(id); if (enc_factura == null) { return(HttpNotFound()); } return(View(enc_factura)); }
// GET: enc_factura/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } enc_factura enc_factura = db.enc_factura.Find(id); if (enc_factura == null) { return(HttpNotFound()); } ViewBag.cliente = new SelectList(db.cliente, "nit", "nombre", enc_factura.cliente); ViewBag.usuario = new SelectList(db.usuario, "id", "pass", enc_factura.usuario); return(View(enc_factura)); }