public IActionResult ProductDelete(string id)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageCustomers))
                return AccessDeniedView();

            var ctp = _customerTagService.GetCustomerTagProductById(id);
            if (ctp == null)
                throw new ArgumentException("No found the specified id");

            _customerTagService.DeleteCustomerTagProduct(ctp);

            return new NullJsonResult();
        }
Esempio n. 2
0
        public IActionResult ProductDelete(string id)
        {
            var ctp = _customerTagService.GetCustomerTagProductById(id);

            if (ctp == null)
            {
                throw new ArgumentException("No found the specified id");
            }
            if (ModelState.IsValid)
            {
                _customerTagService.DeleteCustomerTagProduct(ctp);
                return(new NullJsonResult());
            }
            return(ErrorForKendoGridJson(ModelState));
        }