Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ExitDetails exitDetails = db.ExitDetails.Find(id);

            db.ExitDetails.Remove(exitDetails);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 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));
 }
Example #3
0
        // 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));
        }
Example #4
0
        // 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));
        }