public ActionResult DeleteConfirmed(int id) { ExitDetails exitDetails = db.ExitDetails.Find(id); db.ExitDetails.Remove(exitDetails); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Amount,Price,Subtotal,ProductID,ExitNoteID")] ExitDetails exitDetails) { if (ModelState.IsValid) { db.Entry(exitDetails).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ExitNoteID = new SelectList(db.ExitNote, "Id", "Id", exitDetails.ExitNoteID); ViewBag.ProductID = new SelectList(db.Product, "Id", "Code", exitDetails.ProductID); return(View(exitDetails)); }
// GET: ExitDetails/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ExitDetails exitDetails = db.ExitDetails.Find(id); if (exitDetails == null) { return(HttpNotFound()); } return(View(exitDetails)); }
// GET: ExitDetails/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ExitDetails exitDetails = db.ExitDetails.Find(id); if (exitDetails == null) { return(HttpNotFound()); } ViewBag.ExitNoteID = new SelectList(db.ExitNote, "Id", "Id", exitDetails.ExitNoteID); ViewBag.ProductID = new SelectList(db.Product, "Id", "Code", exitDetails.ProductID); return(View(exitDetails)); }