Пример #1
0
        public IActionResult Details(int Id)
        {
            ShopDetailsVM model = new ShopDetailsVM();

            model.Shop       = shopOperations.GetShop(Id);
            model.Components = shopOperations.GetComponents();
            return(View(model));
        }
Пример #2
0
        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));
        }
Пример #3
0
 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));
 }