Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Admin panel - Remove unused variable
KrzysztofPajaka839aaf347e1
diff --git a/src/Web/Grand.Web.Admin/Controllers/BrandController.cs b/src/Web/Grand.Web.Admin/Controllers/BrandController.csindex f443ec384..af76a2c30 100644--- a/src/Web/Grand.Web.Admin/Controllers/BrandController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/BrandController.cs@@ -325,7 +325,6 @@ namespace Grand.Web.Admin.Controllersawait _pictureViewModelService.UpdatePicture(model);- ViewBag.RefreshPage = true;return Content("");}diff --git a/src/Web/Grand.Web.Admin/Controllers/CategoryController.cs b/src/Web/Grand.Web.Admin/Controllers/CategoryController.csindex 84edd7c84..ea8c3f8d0 100644--- a/src/Web/Grand.Web.Admin/Controllers/CategoryController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/CategoryController.cs@@ -294,7 +294,6 @@ namespace Grand.Web.Admin.Controllersawait _pictureViewModelService.UpdatePicture(model);- ViewBag.RefreshPage = true;return Content("");}@@ -430,7 +429,7 @@ namespace Grand.Web.Admin.Controllers{await _categoryViewModelService.InsertCategoryProductModel(model);}- ViewBag.RefreshPage = true;+return Content("");}elsediff --git a/src/Web/Grand.Web.Admin/Controllers/CollectionController.cs b/src/Web/Grand.Web.Admin/Controllers/CollectionController.csindex f1dc6581d..8c3bc73a9 100644--- a/src/Web/Grand.Web.Admin/Controllers/CollectionController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/CollectionController.cs@@ -328,7 +328,6 @@ namespace Grand.Web.Admin.Controllersawait _pictureViewModelService.UpdatePicture(model);- ViewBag.RefreshPage = true;return Content("");}@@ -468,7 +467,6 @@ namespace Grand.Web.Admin.Controllers{await _collectionViewModelService.InsertCollectionProductModel(model);}- ViewBag.RefreshPage = true;return Content("");}elsediff --git a/src/Web/Grand.Web.Admin/Controllers/ProductController.cs b/src/Web/Grand.Web.Admin/Controllers/ProductController.csindex be5ce0b8e..a41e45404 100644--- a/src/Web/Grand.Web.Admin/Controllers/ProductController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/ProductController.cs@@ -752,7 +752,6 @@ namespace Grand.Web.Admin.Controllers}//a vendor should have access only to his productsmodel.IsLoggedInAsVendor = _workContext.CurrentVendor != null;- ViewBag.RefreshPage = true;return Content("");}else@@ -857,7 +856,6 @@ namespace Grand.Web.Admin.Controllers//a vendor should have access only to his productsmodel.IsLoggedInAsVendor = _workContext.CurrentVendor != null;- ViewBag.RefreshPage = true;return Content("");}else@@ -953,9 +951,6 @@ namespace Grand.Web.Admin.Controllers{await _productViewModelService.InsertCrossSellProductModel(model);}- //a vendor should have access only to his products- model.IsLoggedInAsVendor = _workContext.CurrentVendor != null;- ViewBag.RefreshPage = true;return Content("");}else@@ -1050,9 +1045,6 @@ namespace Grand.Web.Admin.Controllers{await _productViewModelService.InsertRecommendedProductModel(model);}- //a vendor should have access only to his products- model.IsLoggedInAsVendor = _workContext.CurrentVendor != null;- ViewBag.RefreshPage = true;return Content("");}else@@ -1168,9 +1160,6 @@ namespace Grand.Web.Admin.Controllers{await _productViewModelService.InsertAssociatedProductModel(model);}- //a vendor should have access only to his products- model.IsLoggedInAsVendor = _workContext.CurrentVendor != null;- ViewBag.RefreshPage = true;return Content("");}else@@ -1366,7 +1355,6 @@ namespace Grand.Web.Admin.Controllersawait _productViewModelService.UpdateProductPicture(model);- ViewBag.RefreshPage = true;return Content("");}@@ -1834,7 +1822,7 @@ namespace Grand.Web.Admin.Controllersvar tierPrice = model.ToEntity(_dateTimeService);await _productService.InsertTierPrice(tierPrice, product.Id);- ViewBag.RefreshPage = true;+return Content("");}else@@ -1884,7 +1872,6 @@ namespace Grand.Web.Admin.ControllerstierPrice = model.ToEntity(tierPrice, _dateTimeService);await _productService.UpdateTierPrice(tierPrice, product.Id);- ViewBag.RefreshPage = true;return Content("");}Error(ModelState);@@ -2038,7 +2025,6 @@ namespace Grand.Web.Admin.Controllersif (ModelState.IsValid){await _productViewModelService.UpdateProductAttributeValidationRulesModel(productAttributeMapping, model);- ViewBag.RefreshPage = true;return Content("");}Error(ModelState);@@ -2205,7 +2191,7 @@ namespace Grand.Web.Admin.Controllersif (ModelState.IsValid){await _productViewModelService.InsertProductAttributeValueModel(model);- ViewBag.RefreshPage = true;+return Content("");}//If we got this far, something failed, redisplay form@@ -2273,7 +2259,6 @@ namespace Grand.Web.Admin.Controllersif (ModelState.IsValid){await _productViewModelService.UpdateProductAttributeValueModel(pav, model);- ViewBag.RefreshPage = true;return Content("");}//If we got this far, something failed, redisplay form@@ -2341,10 +2326,6 @@ namespace Grand.Web.Admin.Controllersif (_workContext.CurrentVendor != null && associatedProduct.VendorId != _workContext.CurrentVendor.Id && !await _groupService.IsStaff(_workContext.CurrentCustomer))return Content("This is not your product");- model.IsLoggedInAsVendor = _workContext.CurrentVendor != null;- ViewBag.RefreshPage = true;- ViewBag.productId = associatedProduct.Id;- ViewBag.productName = associatedProduct.Name;return Content("");}@@ -2443,7 +2424,6 @@ namespace Grand.Web.Admin.Controllersvar warnings = await _productViewModelService.InsertOrUpdateProductAttributeCombinationPopup(product, model, formcollection);if (!warnings.Any()){- ViewBag.RefreshPage = true;return Content("");}//If we got this far, something failed, redisplay form