Exemplo n.º 1
0
        public bool AddDonor(displaydonor displayDonor, string host)
        {
            var registrationCode = GenerateRandomNumberString(100);

            displayDonor.Password = PasswordHasher.HashPassword(displayDonor.Password);

            if (true == _customDataAccess.AddDonor(displayDonor, registrationCode))
            {
                if (true == SendThroughProduction(displayDonor.EmailAddress, "Youth in View Account Registration",
                                                  BuildRegistrationEmail(host, registrationCode)))
                {
                    return(true);
                }
            }

            return(false);
        }