public async Task <IActionResult> Delete(string id)
        {
            var form = await _interactiveFormService.GetFormById(id);

            if (form == null)
            {
                return(RedirectToAction("List"));
            }

            await _interactiveFormService.DeleteForm(form);

            await _customerActivityService.InsertActivity("InteractiveFormDelete", form.Id, _translationService.GetResource("ActivityLog.InteractiveFormDeleted"), form.Name);

            Success(_translationService.GetResource("admin.marketing.InteractiveForms.Deleted"));
            return(RedirectToAction("List"));
        }
        public IActionResult Delete(string id)
        {
            var form = _interactiveFormService.GetFormById(id);

            if (form == null)
            {
                return(RedirectToAction("List"));
            }

            _interactiveFormService.DeleteForm(form);

            _customerActivityService.InsertActivity("InteractiveFormDelete", form.Id, _localizationService.GetResource("ActivityLog.InteractiveFormDeleted"), form.Name);

            SuccessNotification(_localizationService.GetResource("Admin.Promotions.InteractiveForms.Deleted"));
            return(RedirectToAction("List"));
        }
예제 #3
0
        public IActionResult Delete(string id)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageInteractiveForm))
            {
                return(AccessDeniedView());
            }

            var form = _interactiveFormService.GetFormById(id);

            if (form == null)
            {
                return(RedirectToAction("List"));
            }

            _interactiveFormService.DeleteForm(form);

            _customerActivityService.InsertActivity("InteractiveFormDelete", form.Id, _localizationService.GetResource("ActivityLog.InteractiveFormDeleted"), form.Name);

            SuccessNotification(_localizationService.GetResource("Admin.Promotions.InteractiveForms.Deleted"));
            return(RedirectToAction("List"));
        }