private PrimaryEmail GetPrimaryEmail(Applicant organization) { var primaryEmail = new PrimaryEmail() { EmailAddress = organization.Email }; return(primaryEmail); }
public string GetCompanyInfoFromPrimaryEmail() { var domain = PrimaryEmail.Substring(PrimaryEmail.IndexOf("@", StringComparison.Ordinal) + 1); if (domain.Contains(".")) { return(domain.Substring(0, domain.IndexOf(".", StringComparison.Ordinal))); } return(domain); }
protected override void Validate() { if (string.IsNullOrEmpty(PrimaryEmail) && (string.IsNullOrEmpty(FirstName) || string.IsNullOrEmpty(LastName))) { AddBrokenRule(ValueObjects.ValueObjectBusinessRule.ContactNotValid); } if (!string.IsNullOrEmpty(PrimaryEmail) && !IsValidEmail(PrimaryEmail.Trim())) { AddBrokenRule(ValueObjects.ValueObjectBusinessRule.EmailIsInvalid); } }
private PrimaryEmail GetPrimaryEmail(LmsPerson lmsPerson) { var applicant = lmsPerson.Applicant; var authorizedUser = lmsPerson.AuthorizedUser; var primaryEmail = new PrimaryEmail(); if (applicant != null && authorizedUser == null) { primaryEmail.EmailAddress = applicant.Email; } else if (applicant == null && authorizedUser != null) { primaryEmail.EmailAddress = authorizedUser.Email; } return(primaryEmail); }