Esempio n. 1
0
        public virtual IActionResult Edit(int id)
        {
            //try to get a queued email with the specified id
            var email = _queuedEmailService.GetQueuedEmailById(id);

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

            //prepare model
            var model = _queuedEmailModelFactory.PrepareQueuedEmailModel(null, email);

            return(View(model));
        }
Esempio n. 2
0
        public virtual IActionResult Edit(int id)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                return(AccessDeniedView());
            }

            //try to get a queued email with the specified id
            var email = _queuedEmailService.GetQueuedEmailById(id);

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

            //prepare model
            var model = _queuedEmailModelFactory.PrepareQueuedEmailModel(null, email);

            return(View(model));
        }