예제 #1
0
        /// <summary>
        /// Defines <see cref="AudienceQuery"/> for add new participants in campaign.
        /// </summary>
        /// <returns><see cref="Select"/> query which returns contacts for add in campaign.</returns>
        protected override Select GetContactsSelect()
        {
            var selectModel = LandingContactQueryProvider.GetSelectModel(LandingId, UserConnection);

            SourceSelectContactIdColumnName = selectModel.ContactIdColumnName;
            return(selectModel.ContactSelect);
        }
        /// <summary>
        /// Contains custom logic for <see cref="AudieceQuery"/> initialization.
        /// </summary>
        /// <returns>Initialized <see cref="Query"/> to use as campaign audience.</returns>
        protected override Query GetAudienceQuery()
        {
            var selectModel        = LandingContactQueryProvider.GetSelectModel(LandingId, UserConnection);
            var participantsSelect = base.GetAudienceQuery();

            participantsSelect.And(CampaignParticipantTable, "ContactId").In(selectModel.ContactSelect);
            return(participantsSelect);
        }