public IActionResult Details(int Id) { ShopDetailsVM model = new ShopDetailsVM(); model.Shop = shopOperations.GetShop(Id); model.Components = shopOperations.GetComponents(); return(View(model)); }
public IActionResult DeleteProd(int Id, int shop) { shopOperations.DeleteProd(Id); ShopDetailsVM model = new ShopDetailsVM(); model.Shop = shopOperations.GetShop(shop); model.Components = shopOperations.GetComponents(); return(View("Details", model)); }
public IActionResult AddProductShop(ShopDetailsVM model) { if (!ModelState.IsValid) { model.Shop = shopOperations.GetShop(model.ShopProduct.ShopId); model.Components = shopOperations.GetComponents(); return(View("Details", model)); } shopOperations.AddShopProduct(model.ShopProduct); model.Shop = shopOperations.GetShop(model.ShopProduct.ShopId); model.Components = shopOperations.GetComponents(); return(View("Details", model)); }