Ejemplo n.º 1
0
        public ActionResult SendTransferUserNotification(string requesterSnp,
                                                         string requesterDepartment,
                                                         string transferUserSnp,
                                                         string transferToDepartment,
                                                         string transferToUnit,
                                                         string transferFromDepartment,
                                                         string transferFromUnit)
        {
            if (!_securityService.CanSendTransferUserNotification())
            {
                return(RedirectToAction("ForbiddenError", "Home"));
            }
            var emails = _emailBuilder.CreateSendTransferUserEmails(
                requesterSnp,
                requesterDepartment,
                transferUserSnp,
                transferToDepartment,
                transferToUnit,
                transferFromDepartment,
                transferFromUnit);

            _emailSender.Send(emails);
            return(new HttpStatusCodeResult(HttpStatusCode.OK));
        }