Exemple #1
0
        public void SendInvite(Invite invite, string senderName, string senderEmail)
        {
            if (invite == null)
            {
                return;
            }

            if (invite.Department == null)
            {
                invite.Department = _departmentsService.GetDepartmentById(invite.DepartmentId);
            }

            _emailProvider.SendInviteMail(invite.Code.ToString(), invite.Department.Name, invite.EmailAddress, senderName, senderEmail);
        }
Exemple #2
0
        public async Task <bool> SendInviteAsync(Invite invite, string senderName, string senderEmail)
        {
            if (invite == null)
            {
                return(false);
            }

            if (invite.Department == null)
            {
                invite.Department = await _departmentsService.GetDepartmentByIdAsync(invite.DepartmentId);
            }

            await _emailProvider.SendInviteMail(invite.Code.ToString(), invite.Department.Name, invite.EmailAddress, senderName, senderEmail);

            return(true);
        }