public ActionResult DeleteConfirmed(Guid id)
        {
            ImportedUnStandardProduct importedUnStandardProduct = db.ImportedUnStandardProducts.Find(id);

            db.ImportedUnStandardProducts.Remove(importedUnStandardProduct);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,ProductId,OrderItemId,ProductIssueId,Date,AmountImportedInMeter,AmountImportedInKilo,Issue,Comments")] ImportedUnStandardProduct importedUnStandardProduct)
 {
     if (ModelState.IsValid)
     {
         db.Entry(importedUnStandardProduct).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.OrderItemId    = new SelectList(db.OrderItems, "Id", "Comments", importedUnStandardProduct.OrderItemId);
     ViewBag.ProductId      = new SelectList(db.Products, "Id", "Code", importedUnStandardProduct.ProductId);
     ViewBag.ProductIssueId = new SelectList(db.ProductIssues, "Id", "Title", importedUnStandardProduct.ProductIssueId);
     return(View(importedUnStandardProduct));
 }
        // GET: Storage/ImportedUnStandardProducts/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ImportedUnStandardProduct importedUnStandardProduct = db.ImportedUnStandardProducts.Find(id);

            if (importedUnStandardProduct == null)
            {
                return(HttpNotFound());
            }
            return(View(importedUnStandardProduct));
        }
        public ActionResult Create([Bind(Include = "Id,ProductId,OrderItemId,ProductIssueId,Date,AmountImportedInMeter,AmountImportedInKilo,Issue,Comments")] ImportedUnStandardProduct importedUnStandardProduct)
        {
            if (ModelState.IsValid)
            {
                importedUnStandardProduct.Id = Guid.NewGuid();
                db.ImportedUnStandardProducts.Add(importedUnStandardProduct);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.OrderItemId    = new SelectList(db.OrderItems, "Id", "Comments", importedUnStandardProduct.OrderItemId);
            ViewBag.ProductId      = new SelectList(db.Products, "Id", "Code", importedUnStandardProduct.ProductId);
            ViewBag.ProductIssueId = new SelectList(db.ProductIssues, "Id", "Title", importedUnStandardProduct.ProductIssueId);
            return(View(importedUnStandardProduct));
        }
        // GET: Storage/ImportedUnStandardProducts/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ImportedUnStandardProduct importedUnStandardProduct = db.ImportedUnStandardProducts.Find(id);

            if (importedUnStandardProduct == null)
            {
                return(HttpNotFound());
            }
            ViewBag.OrderItemId    = new SelectList(db.OrderItems, "Id", "Comments", importedUnStandardProduct.OrderItemId);
            ViewBag.ProductId      = new SelectList(db.Products, "Id", "Code", importedUnStandardProduct.ProductId);
            ViewBag.ProductIssueId = new SelectList(db.ProductIssues, "Id", "Title", importedUnStandardProduct.ProductIssueId);
            return(View(importedUnStandardProduct));
        }