public ActionResult DeleteConfirmed(int id)
        {
            PackageStock packageStock = db.PackageStocks.Find(id);

            db.PackageStocks.Remove(packageStock);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,Quantity,PackageID,SectorID")] PackageStock packageStock)
 {
     if (ModelState.IsValid)
     {
         db.Entry(packageStock).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PackageID = new SelectList(db.Packages, "ID", "Name", packageStock.PackageID);
     ViewBag.SectorID  = new SelectList(db.Sectors, "ID", "Name", packageStock.SectorID);
     return(View(packageStock));
 }
        // GET: PackageStocks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PackageStock packageStock = db.PackageStocks.Find(id);

            if (packageStock == null)
            {
                return(HttpNotFound());
            }
            return(View(packageStock));
        }
        // GET: PackageStocksStocks/SubmitOrder
        public ActionResult SubmitOrder(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PackageStock packageStock = db.PackageStocks.Find(id);

            if (packageStock == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PackageID = new SelectList(db.Packages, "ID", "Name", packageStock.PackageID);
            return(View(packageStock));
        }