public ActionResult RateDelete(int id, GridCommand command) { var taxRate = _taxRateService.GetTaxRateById(id); _taxRateService.DeleteTaxRate(taxRate); return(RatesList(command)); }
public async Task <IActionResult> RateDelete(string id) { var taxRate = await _taxRateService.GetTaxRateById(id); if (taxRate != null) { await _taxRateService.DeleteTaxRate(taxRate); } return(new NullJsonResult()); }
//tax category public void HandleEvent(EntityDeleted <TaxCategory> eventMessage) { if (eventMessage.Entity == null) { return; } //delete an appropriate record when tax category is deleted var recordsToDelete = _taxRateService.GetAllTaxRates().Where(tr => tr.TaxCategoryId == eventMessage.Entity.Id).ToList(); foreach (var taxRate in recordsToDelete) { _taxRateService.DeleteTaxRate(taxRate); } }
public ActionResult RateDelete(string id) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageTaxSettings)) { return(Content("Access denied")); } var taxRate = _taxRateService.GetTaxRateById(id); if (taxRate != null) { _taxRateService.DeleteTaxRate(taxRate); } return(new NullJsonResult()); }
public ActionResult RateDelete(int id, GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageTaxSettings)) { return(Content("Access denied")); } var taxRate = _taxRateService.GetTaxRateById(id); if (taxRate != null) { _taxRateService.DeleteTaxRate(taxRate); } return(RatesList(command)); }
public object DeleteTaxRate(int id) { return(controller.DeleteTaxRate(id)); }