Esempio n. 1
0
        public int Add(ReferralDTO referral)
        {
            ApplicationUser applicationUser = RequestContext.GetLoggedInUser();

            referral.CreatedBy = applicationUser.UserID;

            int referrralId = _referralService.AddReferral(referral);

            //Send referral request
            if (referrralId > 0)
            {
                this._emailService.SendAsyncMail(applicationUser.EmailAddress, referral.To, referral.Subject, referral.Message);
            }

            return(referrralId);
        }
Esempio n. 2
0
 /// <summary>
 /// Adds referral
 /// </summary>
 /// <param name="referral"></param>
 /// <returns></returns>
 public Response <ReferralModel> AddReferral(ReferralModel referral)
 {
     return(referralService.AddReferral(referral));
 }