Exemplo n.º 1
0
        public IActionResult Edit(Product product, int[] selectedSuppliers)
        {
            if (!ModelState.IsValid)
            {
                return(StatusCode(400));
            }

            ViewBag.Suppliers = _supplierManager.GetSuppliers().ToList();
            product.Suppliers = _supplierManager.GetSuppliersByIds(selectedSuppliers);
            _productManager.RefreshStock(product);
            return(View(product));
        }
Exemplo n.º 2
0
 public void Put(Product product)
 {
     _productManager.RefreshStock(product);
 }