Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            imgBanner.ImageUrl = this.Model.BannerImage.MediaItem != null ? this.Model.BannerImage.MediaUrl : "";

            List <DefaultArticlePageItem> recommendedArticles;

            if (IsUserLoggedIn)
            {
                recommendedArticles = SearchHelper.GetRecommendedContent(CurrentMember, DefaultArticlePageItem.TemplateId)
                                      .Where(a => a.GetItem() != null)
                                      .Select(a => new DefaultArticlePageItem(a.GetItem()))
                                      .ToList();

                BaseReply reply = ExactTargetService.InvokeEM11DonationAcknowledgement(new InvokeEM11DonationAcknowledgementRequest {
                    RequestUrl = Request.Url, DonationAmount = "$0.00", FullName = CurrentMember.FirstName, PreferredLanguage = CurrentMember.PreferredLanguage, ToEmail = CurrentMember.Email
                });


                if (recommendedArticles.Count > 0)
                {
                    rptFeaturedArticles.DataSource = recommendedArticles.Take(4);
                    rptFeaturedArticles.DataBind();
                }
            }
        }
        protected void btnEM11_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM11DonationAcknowledgement(new InvokeEM11DonationAcknowledgementRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text, DonationAmount = "1 Billion Dollars", FullName = tbxSubscriberFN1.Text, PrintDonationRecordsLink = "www.google.com"
            });

            lblMessage.Text = reply.Message;
        }