Пример #1
0
        public async Task TestGetDefaultExchangeVisitorFundingAsync_CheckFunding()
        {
            var model = new DefaultExchangeVisitorFunding
            {
                ProjectId          = 1,
                FundingSponsor     = 1,
                FundingPersonal    = 2,
                FundingVisGovt     = 3,
                FundingVisBNC      = 4,
                FundingGovtAgency1 = 5,
                FundingGovtAgency2 = 6,
                FundingIntlOrg1    = 7,
                FundingIntlOrg2    = 8,
                FundingOther       = 9,
                FundingTotal       = 45
            };

            context.DefaultExchangeVisitorFunding.Add(model);
            var result = await service.GetDefaultExchangeVisitorFundingAsync(model.ProjectId);

            Assert.AreEqual(1, result.FundingSponsor);
            Assert.AreEqual(2, result.FundingPersonal);
            Assert.AreEqual(3, result.FundingVisGovt);
            Assert.AreEqual(4, result.FundingVisBNC);
            Assert.AreEqual(5, result.FundingGovtAgency1);
            Assert.AreEqual(6, result.FundingGovtAgency2);
            Assert.AreEqual(7, result.FundingIntlOrg1);
            Assert.AreEqual(8, result.FundingIntlOrg2);
            Assert.AreEqual(9, result.FundingOther);
            Assert.AreEqual(45, result.FundingTotal);
        }
Пример #2
0
 private void CreateDefaultExchangeVisitorFunding(PublishedProject updatedProject, Project projectToUpdate, DefaultExchangeVisitorFunding existingDefaultExchangeVisitorFunding)
 {
     if (existingDefaultExchangeVisitorFunding == null && updatedProject.VisitorTypeId == VisitorType.ExchangeVisitor.Id)
     {
         var defaultExchangeVisitorFunding = new DefaultExchangeVisitorFunding
         {
             Project = projectToUpdate
         };
         projectToUpdate.DefaultExchangeVisitorFunding = defaultExchangeVisitorFunding;
         Context.DefaultExchangeVisitorFunding.Add(defaultExchangeVisitorFunding);
     }
 }
Пример #3
0
        public async Task TestGetDefaultExchangeVisitorFundingAsync_CheckOtherName()
        {
            var model = new DefaultExchangeVisitorFunding
            {
                ProjectId = 1,
                OtherName = "otherName"
            };

            context.DefaultExchangeVisitorFunding.Add(model);
            var result = await service.GetDefaultExchangeVisitorFundingAsync(model.ProjectId);

            Assert.AreEqual(model.OtherName, result.OtherName);
        }
Пример #4
0
        public async Task TestGetDefaultExchangeVisitorFundingAsync_NullAgenciesAndOrgs()
        {
            var model = new DefaultExchangeVisitorFunding
            {
                ProjectId = 1
            };

            context.DefaultExchangeVisitorFunding.Add(model);
            var result = await service.GetDefaultExchangeVisitorFundingAsync(model.ProjectId);

            Assert.IsNull(result.GovtAgency1Id);
            Assert.IsNull(result.GovtAgency2Id);
            Assert.IsNull(result.IntlOrg1Id);
            Assert.IsNull(result.IntlOrg2Id);
        }
Пример #5
0
        public async Task TestGetDefaultExchangeVisitorFundingAsync_CheckDefaultFunding()
        {
            var model = new DefaultExchangeVisitorFunding
            {
                ProjectId = 1
            };

            context.DefaultExchangeVisitorFunding.Add(model);
            var result = await service.GetDefaultExchangeVisitorFundingAsync(model.ProjectId);

            Assert.AreEqual(model.ProjectId, result.ProjectId);
            Assert.AreEqual(0, result.FundingSponsor);
            Assert.AreEqual(0, result.FundingPersonal);
            Assert.AreEqual(0, result.FundingVisGovt);
            Assert.AreEqual(0, result.FundingVisBNC);
            Assert.AreEqual(0, result.FundingGovtAgency1);
            Assert.AreEqual(0, result.FundingGovtAgency2);
            Assert.AreEqual(0, result.FundingIntlOrg1);
            Assert.AreEqual(0, result.FundingIntlOrg2);
            Assert.AreEqual(0, result.FundingOther);
            Assert.AreEqual(0, result.FundingTotal);
        }
Пример #6
0
        private void DoUpdate(DefaultExchangeVisitorFunding defaultExchangeVisitorFunding, UpdatedDefaultExchangeVisitorFunding updatedDefaultExchangeVisitorFunding)
        {
            updatedDefaultExchangeVisitorFunding.Audit.SetHistory(defaultExchangeVisitorFunding);

            defaultExchangeVisitorFunding.FundingSponsor       = updatedDefaultExchangeVisitorFunding.FundingSponsor;
            defaultExchangeVisitorFunding.FundingPersonal      = updatedDefaultExchangeVisitorFunding.FundingPersonal;
            defaultExchangeVisitorFunding.FundingVisGovt       = updatedDefaultExchangeVisitorFunding.FundingVisGovt;
            defaultExchangeVisitorFunding.FundingVisBNC        = updatedDefaultExchangeVisitorFunding.FundingVisBNC;
            defaultExchangeVisitorFunding.FundingGovtAgency1   = updatedDefaultExchangeVisitorFunding.FundingGovtAgency1;
            defaultExchangeVisitorFunding.GovtAgency1Id        = updatedDefaultExchangeVisitorFunding.GovtAgency1Id;
            defaultExchangeVisitorFunding.GovtAgency1OtherName = updatedDefaultExchangeVisitorFunding.GovtAgency1OtherName;
            defaultExchangeVisitorFunding.FundingGovtAgency2   = updatedDefaultExchangeVisitorFunding.FundingGovtAgency2;
            defaultExchangeVisitorFunding.GovtAgency2Id        = updatedDefaultExchangeVisitorFunding.GovtAgency2Id;
            defaultExchangeVisitorFunding.GovtAgency2OtherName = updatedDefaultExchangeVisitorFunding.GovtAgency2OtherName;
            defaultExchangeVisitorFunding.FundingIntlOrg1      = updatedDefaultExchangeVisitorFunding.FundingIntlOrg1;
            defaultExchangeVisitorFunding.IntlOrg1Id           = updatedDefaultExchangeVisitorFunding.IntlOrg1Id;
            defaultExchangeVisitorFunding.IntlOrg1OtherName    = updatedDefaultExchangeVisitorFunding.IntlOrg1OtherName;
            defaultExchangeVisitorFunding.FundingIntlOrg2      = updatedDefaultExchangeVisitorFunding.FundingIntlOrg2;
            defaultExchangeVisitorFunding.IntlOrg2Id           = updatedDefaultExchangeVisitorFunding.IntlOrg2Id;
            defaultExchangeVisitorFunding.IntlOrg2OtherName    = updatedDefaultExchangeVisitorFunding.IntlOrg2OtherName;
            defaultExchangeVisitorFunding.FundingOther         = updatedDefaultExchangeVisitorFunding.FundingOther;
            defaultExchangeVisitorFunding.OtherName            = updatedDefaultExchangeVisitorFunding.OtherName;
            defaultExchangeVisitorFunding.FundingTotal         = updatedDefaultExchangeVisitorFunding.FundingTotal;
        }
Пример #7
0
 /// <summary>
 /// Sets the given participant to reference the person as a participant.
 /// </summary>
 /// <param name="participant">The participant to update.</param>
 protected override void UpdateParticipantDetails(Participant participant, VisitorType visitorType, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding)
 {
     participant.OrganizationId    = null;
     participant.PersonId          = this.PersonId;
     participant.ParticipantPerson = new ParticipantPerson
     {
         Participant = participant
     };
     if (visitorType != null && visitorType.VisitorTypeId == VisitorType.ExchangeVisitor.Id)
     {
         participant.ParticipantExchangeVisitor = new ParticipantExchangeVisitor
         {
             Participant       = participant,
             ParticipantPerson = participant.ParticipantPerson
         };
         if (defaultExchangeVisitorFunding != null)
         {
             participant.ParticipantExchangeVisitor.FundingSponsor       = defaultExchangeVisitorFunding.FundingSponsor;
             participant.ParticipantExchangeVisitor.FundingPersonal      = defaultExchangeVisitorFunding.FundingPersonal;
             participant.ParticipantExchangeVisitor.FundingVisGovt       = defaultExchangeVisitorFunding.FundingVisGovt;
             participant.ParticipantExchangeVisitor.FundingVisBNC        = defaultExchangeVisitorFunding.FundingVisBNC;
             participant.ParticipantExchangeVisitor.FundingGovtAgency1   = defaultExchangeVisitorFunding.FundingGovtAgency1;
             participant.ParticipantExchangeVisitor.GovtAgency1Id        = defaultExchangeVisitorFunding.GovtAgency1Id;
             participant.ParticipantExchangeVisitor.GovtAgency1OtherName = defaultExchangeVisitorFunding.GovtAgency1OtherName;
             participant.ParticipantExchangeVisitor.FundingGovtAgency2   = defaultExchangeVisitorFunding.FundingGovtAgency2;
             participant.ParticipantExchangeVisitor.GovtAgency2Id        = defaultExchangeVisitorFunding.GovtAgency2Id;
             participant.ParticipantExchangeVisitor.GovtAgency2OtherName = defaultExchangeVisitorFunding.GovtAgency2OtherName;
             participant.ParticipantExchangeVisitor.FundingIntlOrg1      = defaultExchangeVisitorFunding.FundingIntlOrg1;
             participant.ParticipantExchangeVisitor.IntlOrg1Id           = defaultExchangeVisitorFunding.IntlOrg1Id;
             participant.ParticipantExchangeVisitor.IntlOrg1OtherName    = defaultExchangeVisitorFunding.IntlOrg1OtherName;
             participant.ParticipantExchangeVisitor.FundingIntlOrg2      = defaultExchangeVisitorFunding.FundingIntlOrg2;
             participant.ParticipantExchangeVisitor.IntlOrg2Id           = defaultExchangeVisitorFunding.IntlOrg2Id;
             participant.ParticipantExchangeVisitor.IntlOrg2OtherName    = defaultExchangeVisitorFunding.IntlOrg2OtherName;
             participant.ParticipantExchangeVisitor.FundingOther         = defaultExchangeVisitorFunding.FundingOther;
             participant.ParticipantExchangeVisitor.OtherName            = defaultExchangeVisitorFunding.OtherName;
             participant.ParticipantExchangeVisitor.FundingTotal         = defaultExchangeVisitorFunding.FundingTotal;
         }
     }
 }
Пример #8
0
 /// <summary>
 /// Performs participant type specific logic.
 /// </summary>
 /// <param name="participant">The participant being created.</param>
 protected abstract void UpdateParticipantDetails(Participant participant, VisitorType visitorType, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding);
Пример #9
0
 /// <summary>
 /// Updates the given participant with the AdditionalProjectParticipant details.
 /// </summary>
 /// <param name="participant">The participant that is being created.</param>
 /// <param name="participantType">The participant type.</param>
 public void UpdateParticipant(Participant participant, ParticipantType participantType, VisitorType visitorType, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding)
 {
     Contract.Requires(participant != null, "The participant must not be null.");
     Contract.Requires(participantType != null, "The participant type must not be null.");
     participant.ProjectId           = this.ProjectId;
     participant.ParticipantStatusId = this.ParticipantStatusId;
     participant.ParticipantTypeId   = participantType.ParticipantTypeId;
     UpdateParticipantDetails(participant, visitorType, defaultExchangeVisitorFunding);
 }
Пример #10
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="participant"></param>
 protected override void UpdateParticipantDetails(Participant participant, VisitorType visitorType, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding)
 {
     Contract.Requires(participant != null, "The participant must not be null.");
 }
Пример #11
0
        public async Task TestGetDefaultExchangeVisitorFundingAsync_CheckAgenciesAndOrgs()
        {
            var govtAgency1 = new USGovernmentAgency {
                AgencyId    = 1,
                Description = "govtAgency1"
            };

            var govtAgency2 = new USGovernmentAgency {
                AgencyId    = 2,
                Description = "govtAgency2"
            };

            var intlOrg1 = new InternationalOrganization
            {
                OrganizationId = 1,
                Description    = "intlOrg1"
            };

            var intlOrg2 = new InternationalOrganization
            {
                OrganizationId = 2,
                Description    = "intlOrg2"
            };

            context.USGovernmentAgencies.Add(govtAgency1);
            context.USGovernmentAgencies.Add(govtAgency2);
            context.InternationalOrganizations.Add(intlOrg1);
            context.InternationalOrganizations.Add(intlOrg2);

            var model = new DefaultExchangeVisitorFunding
            {
                ProjectId            = 1,
                GovtAgency1Id        = govtAgency1.AgencyId,
                GovtAgency1          = govtAgency1,
                GovtAgency1OtherName = "govtAgency1OtherName",
                GovtAgency2Id        = govtAgency2.AgencyId,
                GovtAgency2          = govtAgency2,
                GovtAgency2OtherName = "govtAgency2OtherName",
                IntlOrg1Id           = intlOrg1.OrganizationId,
                IntlOrg1             = intlOrg1,
                IntlOrg1OtherName    = "intlOrg1OtherName",
                IntlOrg2Id           = intlOrg2.OrganizationId,
                IntlOrg2             = intlOrg2,
                IntlOrg2OtherName    = "intlOrg2OtherName"
            };

            context.DefaultExchangeVisitorFunding.Add(model);
            var result = await service.GetDefaultExchangeVisitorFundingAsync(model.ProjectId);

            Assert.AreEqual(govtAgency1.AgencyId, result.GovtAgency1Id);
            Assert.AreEqual(govtAgency1.Description, result.GovtAgency1Name);
            Assert.AreEqual(model.GovtAgency1OtherName, result.GovtAgency1OtherName);
            Assert.AreEqual(govtAgency2.AgencyId, result.GovtAgency2Id);
            Assert.AreEqual(govtAgency2.Description, result.GovtAgency2Name);
            Assert.AreEqual(model.GovtAgency2OtherName, result.GovtAgency2OtherName);
            Assert.AreEqual(intlOrg1.OrganizationId, result.IntlOrg1Id);
            Assert.AreEqual(intlOrg1.Description, result.IntlOrg1Name);
            Assert.AreEqual(model.IntlOrg1OtherName, result.IntlOrg1OtherName);
            Assert.AreEqual(intlOrg2.OrganizationId, result.IntlOrg2Id);
            Assert.AreEqual(intlOrg2.Description, result.IntlOrg2Name);
            Assert.AreEqual(model.IntlOrg2OtherName, result.IntlOrg2OtherName);
        }
Пример #12
0
        private void DoUpdate(PublishedProject updatedProject, Project projectToUpdate, DefaultExchangeVisitorFunding existingDefaultExchangeVisitorFunding, List <Participant> participantsWithoutParticipantExchangeVisitor)
        {
            Contract.Requires(updatedProject != null, "The updated project must not be null.");
            Contract.Requires(projectToUpdate != null, "The project to update must not be null.");
            SetPointOfContacts(updatedProject.PointsOfContactIds.ToList(), projectToUpdate);
            SetThemes(updatedProject.ThemeIds.ToList(), projectToUpdate);
            SetGoals(updatedProject.GoalIds.ToList(), projectToUpdate);
            SetCategories(updatedProject.CategoryIds.ToList(), projectToUpdate);
            SetObjectives(updatedProject.ObjectiveIds.ToList(), projectToUpdate);
            SetLocations <Project>(updatedProject.LocationIds.ToList(), projectToUpdate, x => x.Locations);
            SetRegions(updatedProject.RegionIds.ToList(), projectToUpdate);
            CreateDefaultExchangeVisitorFunding(updatedProject, projectToUpdate, existingDefaultExchangeVisitorFunding);
            CreateParticipantExchangeVisitors(participantsWithoutParticipantExchangeVisitor);
            projectToUpdate.Name                    = updatedProject.Name;
            projectToUpdate.Description             = updatedProject.Description;
            projectToUpdate.SevisOrgId              = updatedProject.SevisOrgId;
            projectToUpdate.EndDate                 = updatedProject.EndDate;
            projectToUpdate.Name                    = updatedProject.Name;
            projectToUpdate.ProjectStatusId         = updatedProject.ProjectStatusId;
            projectToUpdate.StartDate               = updatedProject.StartDate;
            projectToUpdate.VisitorTypeId           = updatedProject.VisitorTypeId;
            projectToUpdate.UsParticipantsEst       = updatedProject.UsParticipantsEst;
            projectToUpdate.NonUsParticipantsEst    = updatedProject.NonUsParticipantsEst;
            projectToUpdate.UsParticipantsActual    = updatedProject.UsParticipantsActual;
            projectToUpdate.NonUsParticipantsActual = updatedProject.NonUsParticipantsActual;

            Contract.Assert(updatedProject.Audit != null, "The audit must not be null.");
            updatedProject.Audit.SetHistory(projectToUpdate);
        }
Пример #13
0
        public async Task TestUpdateAsync_CheckProperties()
        {
            var govtAgency1 = new USGovernmentAgency
            {
                AgencyId    = 1,
                Description = "govtAgency1"
            };

            var govtAgency2 = new USGovernmentAgency
            {
                AgencyId    = 2,
                Description = "govtAgency2"
            };

            context.USGovernmentAgencies.Add(govtAgency1);
            context.USGovernmentAgencies.Add(govtAgency2);

            var intlOrg1 = new InternationalOrganization
            {
                OrganizationId = 1,
                Description    = "intlOrg1"
            };

            var intlOrg2 = new InternationalOrganization
            {
                OrganizationId = 2,
                Description    = "intlOrg2"
            };

            context.InternationalOrganizations.Add(intlOrg1);
            context.InternationalOrganizations.Add(intlOrg2);

            var initialExchangeVisitorFunding = new DefaultExchangeVisitorFunding
            {
                ProjectId          = 1,
                FundingSponsor     = 0,
                FundingPersonal    = 0,
                FundingVisGovt     = 0,
                FundingVisBNC      = 0,
                FundingGovtAgency1 = 0,
                FundingGovtAgency2 = 0,
                FundingIntlOrg1    = 0,
                FundingIntlOrg2    = 0,
                FundingOther       = 0,
                FundingTotal       = 0
            };

            context.DefaultExchangeVisitorFunding.Add(initialExchangeVisitorFunding);

            var updatedDefaultExchangeVisitorFunding = new UpdatedDefaultExchangeVisitorFunding(
                new Business.Service.User(1),
                1,
                2,
                3,
                4,
                5,
                6,
                govtAgency1.AgencyId,
                "Govt Agency 1",
                7,
                govtAgency2.AgencyId,
                "Govt Agency 2",
                8,
                intlOrg1.OrganizationId,
                "Intl Org 1",
                9,
                intlOrg2.OrganizationId,
                "Intl Org 2",
                10,
                "Other Name",
                55);

            await service.UpdateAsync(updatedDefaultExchangeVisitorFunding);

            var defaultExchangeVisitorFunding = context.DefaultExchangeVisitorFunding.Find(initialExchangeVisitorFunding.ProjectId);

            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.ProjectId, defaultExchangeVisitorFunding.ProjectId);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingSponsor, defaultExchangeVisitorFunding.FundingSponsor);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingPersonal, defaultExchangeVisitorFunding.FundingPersonal);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingVisGovt, defaultExchangeVisitorFunding.FundingVisGovt);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingVisBNC, defaultExchangeVisitorFunding.FundingVisBNC);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingGovtAgency1, defaultExchangeVisitorFunding.FundingGovtAgency1);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingGovtAgency2, defaultExchangeVisitorFunding.FundingGovtAgency2);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingIntlOrg1, defaultExchangeVisitorFunding.FundingIntlOrg1);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingIntlOrg2, defaultExchangeVisitorFunding.FundingIntlOrg2);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingOther, defaultExchangeVisitorFunding.FundingOther);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.FundingTotal, defaultExchangeVisitorFunding.FundingTotal);

            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.GovtAgency1OtherName, defaultExchangeVisitorFunding.GovtAgency1OtherName);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.GovtAgency2OtherName, defaultExchangeVisitorFunding.GovtAgency2OtherName);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.IntlOrg1OtherName, defaultExchangeVisitorFunding.IntlOrg1OtherName);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.IntlOrg2OtherName, defaultExchangeVisitorFunding.IntlOrg2OtherName);
            Assert.AreEqual(updatedDefaultExchangeVisitorFunding.OtherName, defaultExchangeVisitorFunding.OtherName);

            Assert.AreEqual(govtAgency1.AgencyId, defaultExchangeVisitorFunding.GovtAgency1Id);
            Assert.AreEqual(govtAgency2.AgencyId, defaultExchangeVisitorFunding.GovtAgency2Id);
            Assert.AreEqual(intlOrg1.OrganizationId, defaultExchangeVisitorFunding.IntlOrg1Id);
            Assert.AreEqual(intlOrg2.OrganizationId, defaultExchangeVisitorFunding.IntlOrg2Id);
        }
Пример #14
0
 protected override void UpdateParticipantDetails(Data.Participant participant, VisitorType visitorType, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding)
 {
     this.UpdateParticipantDetailsCalled = true;
 }
Пример #15
0
        private void CreateParticipantExchangeVisitor(Participant participant, Project project, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding)
        {
            if (project.VisitorTypeId == VisitorType.ExchangeVisitor.Id)
            {
                var participantExchangeVisitor = new ParticipantExchangeVisitor
                {
                    Participant = participant
                };

                if (defaultExchangeVisitorFunding != null)
                {
                    participantExchangeVisitor.FundingSponsor       = defaultExchangeVisitorFunding.FundingSponsor;
                    participantExchangeVisitor.FundingPersonal      = defaultExchangeVisitorFunding.FundingPersonal;
                    participantExchangeVisitor.FundingVisGovt       = defaultExchangeVisitorFunding.FundingVisGovt;
                    participantExchangeVisitor.FundingVisBNC        = defaultExchangeVisitorFunding.FundingVisBNC;
                    participantExchangeVisitor.FundingGovtAgency1   = defaultExchangeVisitorFunding.FundingGovtAgency1;
                    participantExchangeVisitor.GovtAgency1Id        = defaultExchangeVisitorFunding.GovtAgency1Id;
                    participantExchangeVisitor.GovtAgency1OtherName = defaultExchangeVisitorFunding.GovtAgency1OtherName;
                    participantExchangeVisitor.FundingGovtAgency2   = defaultExchangeVisitorFunding.FundingGovtAgency2;
                    participantExchangeVisitor.GovtAgency2Id        = defaultExchangeVisitorFunding.GovtAgency2Id;
                    participantExchangeVisitor.GovtAgency2OtherName = defaultExchangeVisitorFunding.GovtAgency2OtherName;
                    participantExchangeVisitor.FundingIntlOrg1      = defaultExchangeVisitorFunding.FundingIntlOrg1;
                    participantExchangeVisitor.IntlOrg1Id           = defaultExchangeVisitorFunding.IntlOrg1Id;
                    participantExchangeVisitor.IntlOrg1OtherName    = defaultExchangeVisitorFunding.IntlOrg1OtherName;
                    participantExchangeVisitor.FundingIntlOrg2      = defaultExchangeVisitorFunding.FundingIntlOrg2;
                    participantExchangeVisitor.IntlOrg2Id           = defaultExchangeVisitorFunding.IntlOrg2Id;
                    participantExchangeVisitor.IntlOrg2OtherName    = defaultExchangeVisitorFunding.IntlOrg2OtherName;
                    participantExchangeVisitor.FundingOther         = defaultExchangeVisitorFunding.FundingOther;
                    participantExchangeVisitor.OtherName            = defaultExchangeVisitorFunding.OtherName;
                    participantExchangeVisitor.FundingTotal         = defaultExchangeVisitorFunding.FundingTotal;
                }

                participant.ParticipantExchangeVisitor = participantExchangeVisitor;
                this.Context.ParticipantExchangeVisitors.Add(participantExchangeVisitor);
            }
        }
 /// <summary>
 /// Sets the given participant to reference the organization as a participant.
 /// </summary>
 /// <param name="participant">The participant to update.</param>
 protected override void UpdateParticipantDetails(Participant participant, VisitorType visitorType, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding)
 {
     participant.OrganizationId = this.OrganizationId;
     participant.PersonId       = null;
 }
Пример #17
0
        private Participant DoHandleAdditionalProjectParticipant(AdditionalProjectParticipant additionalProjectParticipant, ParticipantType participantType, VisitorType visitorType, DefaultExchangeVisitorFunding defaultExchangeVisitorFunding)
        {
            var participant = new Participant();

            additionalProjectParticipant.UpdateParticipant(participant, participantType, visitorType, defaultExchangeVisitorFunding);
            additionalProjectParticipant.Audit.SetHistory(participant);
            Context.Participants.Add(participant);
            return(participant);
        }