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

        string siteName = CMSContext.CurrentSiteName;

        // Get bounce limit
        mBounceLimit = SettingsKeyProvider.GetIntValue(siteName + ".CMSBouncedEmailsLimit");
        // Get info if bounced e-mail tracking is available
        mBounceInfoAvailable = SettingsKeyProvider.GetBoolValue(siteName + ".CMSMonitorBouncedEmails") &&
                               NewsletterProvider.OnlineMarketingEnabled(siteName);

        CurrentMaster.HeaderActions.HelpTopicName = "subscribercontacts_tab";
        CurrentMaster.HeaderActions.HelpName      = "helpTopic";

        // Check if parent object exist
        Subscriber sb = SubscriberProvider.GetSubscriber(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)
    {
        newsletterId = QueryHelper.GetInteger("newsletterid", 0);
        if (newsletterId == 0)
        {
            RequestHelper.EndResponse();
        }

        string siteName = CMSContext.CurrentSiteName;

        mBounceMonitoringEnabled = SettingsKeyProvider.GetBoolValue(siteName + ".CMSMonitorBouncedEmails");
        mOnlineMarketingEnabled  = NewsletterProvider.OnlineMarketingEnabled(siteName);

        ScriptHelper.RegisterDialogScript(this);

        string scriptBlock = string.Format(@"
            function RefreshPage() {{ document.location.replace(document.location); }}
            function EditItem(id) {{ modalDialog('{0}?issueid=' + id, 'NewsletterIssueEdit', screen.availWidth - 10, screen.availHeight - 80); }}
            function NewItem(id) {{ modalDialog('{1}?newsletterid=' + id, 'NewsletterNewIssue', screen.availWidth - 10, screen.availHeight - 80); }}
            function ShowOpenedBy(id) {{ modalDialog('{2}?issueid=' + id, 'NewsletterIssueOpenedBy', '900px', '700px');  return false; }}
            function ViewClickedLinks(id) {{ modalDialog('{3}?issueid=' + id, 'NewsletterTrackedLinks', '900px', '700px'); return false; }}",
                                           ResolveUrl(@"~\CMSModules\Newsletters\Tools\Newsletters\Newsletter_Issue_Frameset.aspx"),
                                           ResolveUrl(@"~\CMSModules\Newsletters\Tools\Newsletters\Newsletter_Issue_New_Edit.aspx"),
                                           ResolveUrl(@"~\CMSModules\Newsletters\Tools\Newsletters\Newsletter_Issue_OpenedBy.aspx"),
                                           ResolveUrl(@"~\CMSModules\Newsletters\Tools\Newsletters\Newsletter_Issue_TrackedLinks.aspx"));

        ScriptHelper.RegisterClientScriptBlock(this, GetType(), "Actions", scriptBlock, true);

        UniGrid.OnAction            += uniGrid_OnAction;
        UniGrid.WhereCondition       = "IssueNewsletterID = " + newsletterId;
        UniGrid.OnExternalDataBound += UniGrid_OnExternalDataBound;
        UniGrid.ZeroRowsText         = GetString("Newsletter_Issue_List.NoIssuesFound");
        UniGrid.OnBeforeDataReload  += UniGrid_OnBeforeDataReload;

        // Get newsletter object and check its existence
        EditedObject = newsletter = NewsletterProvider.GetNewsletter(newsletterId);

        InitHeaderActions();
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SiteInfo currentSite = CMSContext.CurrentSite;

        mBounceLimit         = SettingsKeyProvider.GetIntValue(currentSite.SiteName + ".CMSBouncedEmailsLimit");
        mBounceInfoAvailable = SettingsKeyProvider.GetBoolValue(currentSite.SiteName + ".CMSMonitorBouncedEmails") &&
                               NewsletterProvider.OnlineMarketingEnabled(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;
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptHelper.RegisterDialogScript(this);

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

        string siteName = CMSContext.CurrentSiteName;

        mBounceLimit         = SettingsKeyProvider.GetIntValue(siteName + ".CMSBouncedEmailsLimit");
        mBounceInfoAvailable = SettingsKeyProvider.GetBoolValue(siteName + ".CMSMonitorBouncedEmails") &&
                               NewsletterProvider.OnlineMarketingEnabled(siteName);

        newsletterId = QueryHelper.GetInteger("newsletterid", 0);
        Newsletter newsletter = NewsletterProvider.GetNewsletter(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;

        CurrentMaster.DisplayControlsPanel = true;

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

        // Get bounce limit
        mBounceLimit = SettingsKeyProvider.GetIntValue(siteName + ".CMSBouncedEmailsLimit");
        // Get info if bounced e-mail tracking is available
        mBounceInfoAvailable = SettingsKeyProvider.GetBoolValue(siteName + ".CMSMonitorBouncedEmails") &&
                               NewsletterProvider.OnlineMarketingEnabled(siteName);

        CurrentMaster.HeaderActions.HelpTopicName = "subscriberusers_tab";
        CurrentMaster.HeaderActions.HelpName      = "helpTopic";

        // Check if parent object exist
        Subscriber sb = SubscriberProvider.GetSubscriber(QueryHelper.GetInteger("subscriberid", 0));

        EditedObject = sb;

        // Initialize unigrid
        UniGrid.OnAction            += uniGrid_OnAction;
        UniGrid.OnExternalDataBound += uniGrid_OnExternalDataBound;
        UniGrid.WhereCondition       = "((RoleID = " + QueryHelper.GetInteger("roleid", 0) + ") AND (SiteID = " + CMSContext.CurrentSiteID + "))";
    }