protected void Page_Load(object sender, EventArgs e)
    {
        // Check read permission
        ContactHelper.AuthorizedReadContact(CMSContext.CurrentSiteID, true);

        string siteName = CMSContext.CurrentSiteName;

        // Get bounce limit
        mBounceLimit = NewsletterHelper.BouncedEmailsLimit(siteName);
        // Get info if bounced e-mail tracking is available
        mBounceInfoAvailable = NewsletterHelper.MonitorBouncedEmails(siteName);

        // Check if parent object exist
        SubscriberInfo sb = SubscriberInfoProvider.GetSubscriberInfo(QueryHelper.GetInteger("subscriberid", 0));

        EditedObject = sb;

        // Initialize unigrid
        UniGrid.OnAction            += uniGrid_OnAction;
        UniGrid.OnExternalDataBound += uniGrid_OnExternalDataBound;
        UniGrid.WhereCondition       = "ContactID IN (SELECT ContactGroupMemberRelatedID FROM OM_ContactGroupMember WHERE ContactGroupMemberContactGroupID = "
                                       + QueryHelper.GetInteger("groupid", 0) + " AND ContactGroupMemberType = 0) AND ContactSiteID = " + CMSContext.CurrentSiteID
                                       + " AND ContactMergedWithContactID IS NULL";
        UniGrid.ShowObjectMenu = false;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        mBounceLimit = NewsletterHelper.BouncedEmailsLimit(SiteContext.CurrentSiteName);

        if (!RequestHelper.IsPostBack())
        {
            Reload();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SiteInfo currentSite = SiteContext.CurrentSite;

        mBounceLimit         = NewsletterHelper.BouncedEmailsLimit(currentSite.SiteName);
        mBounceInfoAvailable = NewsletterHelper.MonitorBouncedEmails(currentSite.SiteName);

        // Initialize unigrid
        UniGrid.OnAction            += uniGrid_OnAction;
        UniGrid.OnExternalDataBound += uniGrid_OnExternalDataBound;
        UniGrid.WhereCondition       = "SubscriberSiteID = " + currentSite.SiteID;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        mNewsletter = EditedObject as NewsletterInfo;
        if (mNewsletter == null)
        {
            RedirectToAccessDenied(GetString("general.invalidparameters"));
        }

        if (!mNewsletter.CheckPermissions(PermissionsEnum.Read, CurrentSiteName, CurrentUser))
        {
            RedirectToAccessDenied(mNewsletter.TypeInfo.ModuleName, "ManageSubscribers");
        }

        ScriptHelper.RegisterDialogScript(this);

        CurrentMaster.DisplayActionsPanel = true;
        chkRequireOptIn.CheckedChanged   += chkRequireOptIn_CheckedChanged;

        string currentSiteName = SiteContext.CurrentSiteName;

        mBounceLimit         = NewsletterHelper.BouncedEmailsLimit(currentSiteName);
        mBounceInfoAvailable = NewsletterHelper.MonitorBouncedEmails(currentSiteName);

        // Check if newsletter enables double opt-in
        if (!mNewsletter.NewsletterEnableOptIn)
        {
            chkRequireOptIn.Visible = false;
        }

        if (!RequestHelper.IsPostBack())
        {
            chkSendConfirmation.Checked = false;
        }

        // Initialize unigrid
        UniGridSubscribers.WhereCondition       = "NewsletterID = " + mNewsletter.NewsletterID;
        UniGridSubscribers.OnAction            += UniGridSubscribers_OnAction;
        UniGridSubscribers.OnExternalDataBound += UniGridSubscribers_OnExternalDataBound;
        UniGridSubscribers.ZeroRowsText         = GetString("newsletter.subscribers.nodata");
        UniGridSubscribers.FilteredZeroRowsText = GetString("newsletter.subscribers.noitemsfound");

        // Initialize selectors and mass actions
        SetupSelectors();
    }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string siteName = SiteContext.CurrentSiteName;

        // Get bounce limit
        mBounceLimit = NewsletterHelper.BouncedEmailsLimit(siteName);
        // Get info if bounced e-mail tracking is available
        mBounceInfoAvailable = NewsletterHelper.MonitorBouncedEmails(siteName);

        // Check if parent object exist
        SubscriberInfo sb = SubscriberInfoProvider.GetSubscriberInfo(QueryHelper.GetInteger("objectid", 0));

        EditedObject = sb;

        // Initialize unigrid
        UniGrid.OnAction            += uniGrid_OnAction;
        UniGrid.OnExternalDataBound += uniGrid_OnExternalDataBound;
        UniGrid.WhereCondition       = "((RoleID = " + QueryHelper.GetInteger("roleid", 0) + ") AND (SiteID = " + SiteContext.CurrentSiteID + "))";
    }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SiteInfo currentSite = CMSContext.CurrentSite;

        mBounceLimit         = NewsletterHelper.BouncedEmailsLimit(currentSite.SiteName);
        mBounceInfoAvailable = NewsletterHelper.MonitorBouncedEmails(currentSite.SiteName);

        // Add subscriber link
        string[,] actions = new string[1, 6];
        actions[0, 0]     = HeaderActions.TYPE_HYPERLINK;
        actions[0, 1]     = GetString("Subscriber_List.NewItemCaption");
        actions[0, 3]     = ResolveUrl("Subscriber_New.aspx");
        actions[0, 5]     = GetImageUrl("Objects/Newsletter_Subscriber/add.png");

        CurrentMaster.HeaderActions.Actions = actions;

        // Initialize unigrid
        UniGrid.OnAction            += uniGrid_OnAction;
        UniGrid.OnExternalDataBound += uniGrid_OnExternalDataBound;
        UniGrid.WhereCondition       = "SubscriberSiteID = " + currentSite.SiteID;
    }
Exemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SiteInfo currentSite = SiteContext.CurrentSite;

        mBounceLimit         = NewsletterHelper.BouncedEmailsLimit(currentSite.SiteName);
        mBounceInfoAvailable = NewsletterHelper.MonitorBouncedEmails(currentSite.SiteName);

        // Initialize unigrid
        UniGrid.OnAction            += uniGrid_OnAction;
        UniGrid.OnExternalDataBound += uniGrid_OnExternalDataBound;
        UniGrid.WhereCondition       = "SubscriberSiteID = " + currentSite.SiteID;
        UniGrid.FilteredZeroRowsText = GetString("subscriber_list.nodata.filtered");

        if (LicenseContext.CurrentLicenseInfo.Edition == ProductEditionEnum.EnterpriseMarketingSolution)
        {
            UniGrid.ZeroRowsText = string.Format(GetString("subscriber_list.nodata.ems"), URLHelper.ResolveUrl(UIContextHelper.GetApplicationUrl(ModuleName.ONLINEMARKETING, "ContactsFrameset", "?tabname=Contacts")));
        }
        else
        {
            UniGrid.ZeroRowsText = GetString("subscriber_list.nodata.noems");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptHelper.RegisterDialogScript(this);

        CurrentMaster.DisplayActionsPanel = true;
        chkRequireOptIn.CheckedChanged   += chkRequireOptIn_CheckedChanged;

        string siteName = CMSContext.CurrentSiteName;

        mBounceLimit         = NewsletterHelper.BouncedEmailsLimit(siteName);
        mBounceInfoAvailable = NewsletterHelper.MonitorBouncedEmails(siteName);

        newsletterId = QueryHelper.GetInteger("newsletterid", 0);
        NewsletterInfo newsletter = NewsletterInfoProvider.GetNewsletterInfo(newsletterId);

        EditedObject = newsletter;

        // Check if newsletter enables double opt-in
        if ((newsletter != null) && !newsletter.NewsletterEnableOptIn)
        {
            chkRequireOptIn.Visible = false;
        }

        if (!RequestHelper.IsPostBack())
        {
            chkSendConfirmation.Checked = false;
        }

        // Initialize unigrid
        UniGridSubscribers.WhereCondition       = "NewsletterID = " + newsletterId;
        UniGridSubscribers.OnAction            += UniGridSubscribers_OnAction;
        UniGridSubscribers.OnExternalDataBound += UniGridSubscribers_OnExternalDataBound;

        // Initialize selectors and mass actions
        SetupSelectors();
    }
Exemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     mBounceLimit = NewsletterHelper.BouncedEmailsLimit(SiteContext.CurrentSiteName);
 }
    /// <summary>
    /// Returns all e-mail addresses for specified newsletter.
    /// </summary>
    /// <param name="newsletterId">Newsletter</param>
    /// <param name="siteId">Site</param>
    private int GetEmailAddressCount(int newsletterId, int siteId)
    {
        // Get e-mail addresses for ordinary subscriber, user subriber and role subscriber
        string siteName       = SiteInfoProvider.GetSiteName(siteId);
        int    emailAddresses = NewsletterInfoProvider.GetEmailAddressCount(newsletterId, siteName);

        DataSet ContactID = SubscriberNewsletterInfoProvider.GetSubscriptions(
            String.Format("NewsletterID={0} AND (SubscriptionApproved=1 OR SubscriptionApproved IS NULL) AND (SubscriptionEnabled=1 OR SubscriptionEnabled IS NULL) AND SubscriberType='om.contactgroup'", newsletterId), null, 0, "DISTINCT(SubscriberRelatedID) AS SubscriberRelatedID");

        if (!DataHelper.DataSourceIsEmpty(ContactID))
        {
            int groupId = 0;
            foreach (DataRow dr in ContactID.Tables[0].Rows)
            {
                groupId = ValidationHelper.GetInteger(dr[0], 0);

                DataSet dsMembers = ModuleCommands.OnlineMarketingGetContactGroupMemberIDs(groupId, 0, 0,
                                                                                           NewsletterHelper.MonitorBouncedEmails(siteName),
                                                                                           NewsletterHelper.BouncedEmailsLimit(siteName), newsletterId);
                if (!DataHelper.DataSourceIsEmpty(dsMembers))
                {
                    emailAddresses += ValidationHelper.GetInteger(dsMembers.Tables[0].Rows.Count, 0);
                }
            }
        }

        return(emailAddresses);
    }