Beispiel #1
0
        private static Nomination LoadSuperStarAwardsNominationFromSurveyExport(Row row, int rowNumber)
        {
            var isAnonymousNominator            = row[10] != @"Display My Name (Recommended)";
            var nominatorName                   = PersonName.CreateForNominator(row[9], isAnonymousNominator);
            var nomineeName                     = PersonName.Create(row[12]);
            var awardType                       = AwardType.SuperStar;
            var nomineeOfficeLocation           = OfficeLocation.FindByName(row[14]);
            var hasContinuouslyImproving        = !string.IsNullOrWhiteSpace(row[15]);
            var hasDrivingInnovation            = !string.IsNullOrWhiteSpace(row[16]);
            var hasDelightingCustomers          = !string.IsNullOrWhiteSpace(row[17]);
            var hasBehavingWithIntegrity        = !string.IsNullOrWhiteSpace(row[18]);
            var hasDeliveringMeaningfulOutcomes = !string.IsNullOrWhiteSpace(row[19]);
            var hasStreamingGood                = !string.IsNullOrWhiteSpace(row[20]);
            var writeUp        = NominationWriteUp.Create(nomineeName, row[21]);
            var writeUpSummary = NominationWriteUpSummary.NotApplicable;

            var companyValues = GetCompanyValues(hasContinuouslyImproving, hasDrivingInnovation, hasDelightingCustomers,
                                                 hasBehavingWithIntegrity, hasDeliveringMeaningfulOutcomes, hasStreamingGood);

            var nominee = Person.Create(nomineeName, nomineeOfficeLocation, nomineeName.DerivedEmailAddress);

            var nomination = new Nomination(rowNumber, NomineeVotingIdentifier.Unknown, nominee, awardType,
                                            nominatorName, companyValues, writeUp, writeUpSummary);

            return(nomination);
        }
Beispiel #2
0
        internal Nomination ToNomination()
        {
            var nominee = Person.Create(PersonName.Create(NomineeName),
                                        OfficeLocation.FindByName(NomineeOfficeLocation),
                                        EmailAddress.Create(NomineeEmailAddress));

            var companyValues = (CompanyValues ?? Enumerable.Empty <string>())
                                .Select(CompanyValue.FindByValue)
                                .ToList();

            return(new Nomination(Id,
                                  NomineeVotingIdentifier.Unknown,
                                  nominee,
                                  ValueObjects.AwardType.FindByAwardName(AwardType),
                                  PersonName.CreateForNominator(NominatorName, IsNominatorAnonymous),
                                  companyValues,
                                  NominationWriteUp.Create(nominee.Name, WriteUp),
                                  NominationWriteUpSummary.Create(WriteUpSummary)));
        }