Esempio n. 1
0
        public ActionResult Edit(int id, InventoryViewModel inventoryViewModel)
        {
            int StoreID = 0;

            int.TryParse(HttpContext.Session.GetString("StoreID"), out StoreID);

            //Instead of reviewing if the model is valid, we only update the Quantity.
            _buisnessLogicClass.UpdateInventoryQuantity(id, StoreID, inventoryViewModel.Quantity);

            List <InventoryViewModel> inventoryViewModels = _buisnessLogicClass.GetAllTheInventoryFromStore(StoreID);

            return(View("Index", inventoryViewModels));
        }