public ActionResult RateDelete(int id, GridCommand command) { var sbw = _shippingByWeightService.GetById(id); _shippingByWeightService.DeleteShippingByWeightRecord(sbw); return(RatesList(command)); }
public async Task <IActionResult> RateDelete(string id) { var sbw = await _shippingByWeightService.GetById(id); if (sbw != null) { await _shippingByWeightService.DeleteShippingByWeightRecord(sbw); } return(new NullJsonResult()); }
public IActionResult RateDelete(string id) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageShippingSettings)) { return(Content("Access denied")); } var sbw = _shippingByWeightService.GetById(id); if (sbw != null) { _shippingByWeightService.DeleteShippingByWeightRecord(sbw); } return(new NullJsonResult()); }
public ActionResult RateDelete(int id, GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageShippingSettings)) { return(Content("Access denied")); } var sbw = _shippingByWeightService.GetById(id); if (sbw != null) { _shippingByWeightService.DeleteShippingByWeightRecord(sbw); } return(RatesList(command)); }