public ActionResult DeleteAttribute(int attributeId) { var attribute = _attributeService.GetProductAttributeById(attributeId); if (attribute != null) { var productId = attribute.ProductId; _attributeService.DeleteProductAttributeById(attributeId); var stock = GetProductStockQuantity(productId); var product = _productService.GetProductById(productId); product.StockQuantity = stock; _productService.UpdateProduct(product); var jsonData = new { attributeId = attributeId, stock = stock, price = product.Price }; return(AbpJson(jsonData)); } return(AbpJson("true")); }