public ActionResult DeleteSelected(ICollection <int> selectedIds)
        {
            if (selectedIds != null && selectedIds.Count > 0)
            {
                var attributes   = _specificationAttributeService.GetSpecificationAttributesByIds(selectedIds.ToArray()).ToList();
                var deletedNames = string.Join(", ", attributes.Select(x => x.Name));

                attributes.Each(x => _specificationAttributeService.DeleteSpecificationAttribute(x));

                _customerActivityService.InsertActivity("DeleteSpecAttribute", T("ActivityLog.DeleteSpecAttribute"), deletedNames);
            }

            return(Json(new { Result = true }));
        }
Beispiel #2
0
        public ActionResult DeleteSelected(ICollection <int> selectedIds)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageCatalog))
            {
                return(AccessDeniedView());
            }

            if (selectedIds != null && selectedIds.Count > 0)
            {
                var attributes   = _specificationAttributeService.GetSpecificationAttributesByIds(selectedIds.ToArray()).ToList();
                var deletedNames = string.Join(", ", attributes.Select(x => x.Name));

                attributes.Each(x => _specificationAttributeService.DeleteSpecificationAttribute(x));

                _customerActivityService.InsertActivity("DeleteSpecAttribute", _localizationService.GetResource("ActivityLog.DeleteSpecAttribute"), deletedNames);
            }

            return(Json(new { Result = true }));
        }