/// <summary> /// Adds contacts from the campaign audience into audience of the event. /// </summary> /// <param name="campaignId">Unique identifier of the Campaign.</param> /// <param name="eventId">Unique identifier of the Event.</param> private void ActualizeEventAudienceFromCampaign(Guid campaignId, Guid eventId) { try { Guid stepId = MandrillService.GetCampaignStepIdByRecordId(campaignId, eventId, _userConnection); AddContactsToEventFromCampaign(campaignId, eventId, stepId); MandrillService.SetCampaignTargetsCurrentStep(campaignId, stepId, _userConnection); } catch (System.Data.SqlClient.SqlException e) { _log.ErrorFormat( "[EventHelper.ActualizeEventAudienceFromCampaign]: " + "Actualize Event: {0} audience from campaign: {1} fails.", e, eventId, campaignId); throw e; } }
/// <summary> /// Actualize the event audience from the campaign audience and sets event as current step. /// </summary> /// <param name="campaignId">Unique identifier of the Campaign.</param> /// <param name="eventId">Unique identifier of the Event.</param> /// <param name="stepId">Unique identifier of the Campaign step.</param> private void AddContactsToEventFromCampaign(Guid campaignId, Guid eventId, Guid stepId) { Select select = GetSelectContactsCampaignForEvent(campaignId, eventId, stepId); MandrillService.ExecuteInsertSelect(select, GetInsertSelectContactsEventFromCampaign, _userConnection); }