public ActionResult RateDelete(int id, GridCommand command)
        {
            var sbw = _shippingByWeightService.GetById(id);

            _shippingByWeightService.DeleteShippingByWeightRecord(sbw);

            return(RatesList(command));
        }
Exemple #2
0
        public async Task <IActionResult> RateDelete(string id)
        {
            var sbw = await _shippingByWeightService.GetById(id);

            if (sbw != null)
            {
                await _shippingByWeightService.DeleteShippingByWeightRecord(sbw);
            }

            return(new NullJsonResult());
        }
Exemple #3
0
        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));
        }