Example #1
0
        public JsonResult Delete(ConsumptionModel model)
        {
            if (!this.permissionService.Authorize(StandardPermissionProvider.DeleteConsumptionRecord))
            {
                return(AccessDeniedJson());
            }

            var consumption = Mapper.Map <ConsumptionModel, Consumption>(model);

            if (consumption != null)
            {
                consumptionService.DeleteConsumptionCategory(consumption);
            }
            return(Json(model));
        }