public ActionResult Create(ProductStock productstock)
        {
            if (ModelState.IsValid)
            {
                productstock.CreatedDate = DateTime.Now;
                productstock.ModifiedDate = DateTime.Now;
                productstock.ProductStockId = Guid.NewGuid();
                db.ProductStocks.Add(productstock);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.ProductsId = new SelectList(db.Products, "ProductID", "ProductName", productstock.ProductsId);
            return View(productstock);
        }
 public ActionResult Edit(ProductStock productstock)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productstock).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ProductsId = new SelectList(db.Products, "ProductID", "ProductName", productstock.ProductsId);
     return View(productstock);
 }