public ActionResult DeleteConfirmed(Guid id)
        {
            MaterialImported materialImported = db.MaterialImporteds.Find(id);

            db.MaterialImporteds.Remove(materialImported);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,MaterialPurchasedId,AmountImported,DateOfImport,CarriageNumber,Location,DriverName,CarriagePrice,OtherCost,Comments,LostAmount")] MaterialImported materialImported)
 {
     if (ModelState.IsValid)
     {
         db.Entry(materialImported).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaterialPurchasedId = new SelectList(db.MaterialPurchaseds, "Id", "Code", materialImported.MaterialPurchasedId);
     return(View(materialImported));
 }
        // GET: Storage/MaterialImporteds/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MaterialImported materialImported = db.MaterialImporteds.Find(id);

            if (materialImported == null)
            {
                return(HttpNotFound());
            }
            return(View(materialImported));
        }
        // GET: Storage/MaterialImporteds/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MaterialImported materialImported = db.MaterialImporteds.Find(id);

            if (materialImported == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MaterialPurchasedId = new SelectList(db.MaterialPurchaseds, "Id", "Code", materialImported.MaterialPurchasedId);
            return(View(materialImported));
        }