public void UpdateStock(storeNameWithStockModel storeWithStock)
        {
            var stock = context.stocks.Single(p => p.ID == storeWithStock.stockID);

            stock.amount = Convert.ToInt32(storeWithStock.stockAmount);

            context.SaveChanges();
        }
예제 #2
0
 public ActionResult UpdateStockBonus(storeNameWithStockModel storeNameWithStockModel)
 {
     stocksRepo.UpdateStock(storeNameWithStockModel);
     return(RedirectToAction("AllProducts"));
 }