public IActionResult CustomerDelete(string Id, string customerTagId) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageCustomers)) return AccessDeniedView(); var customertag = _customerTagService.GetCustomerTagById(customerTagId); if (customertag == null) throw new ArgumentException("No customertag found with the specified id"); _customerTagService.DeleteTagFromCustomer(customerTagId, Id); return new NullJsonResult(); }
public IActionResult CustomerDelete(string Id, string customerTagId) { var customertag = _customerTagService.GetCustomerTagById(customerTagId); if (customertag == null) { throw new ArgumentException("No customertag found with the specified id"); } if (ModelState.IsValid) { _customerTagService.DeleteTagFromCustomer(customerTagId, Id); return(new NullJsonResult()); } return(ErrorForKendoGridJson(ModelState)); }