protected void btnEM7_Click(object sender, EventArgs e) { BaseReply reply = ExactTargetService.InvokeEM7NewsletterConfirmation(new InvokeEM7NewsletterConfirmationRequest { PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text, ConfirmSubscriptionLink = "www.google.com", WeekDay = "sunday" }); lblMessage.Text = reply.Message; }
void btnSubmit_Click(object sender, EventArgs e) { if (!Page.IsValid) { return; } List <Interest> interests = new List <Interest>(); interests.AddRange(GetSelectedItems(rptSchoolIssuesLeft)); interests.AddRange(GetSelectedItems(rptSchoolIssuesRight)); interests.AddRange(GetSelectedItems(rptGrowingUp)); interests.AddRange(GetSelectedItems(rptHomeLife)); interests.AddRange(GetSelectedItems(rptSocial)); interests.AddRange(GetSelectedItems(rptWaysToHelp)); // Map children List <UnderstoodDotOrg.Domain.Membership.Child> children = new List <Domain.Membership.Child>(); foreach (var c in _submission.Children) { var issues = c.Issues.Select(x => new Issue { Key = x }).ToList(); var grades = new List <Grade>() { new Grade { Key = c.Grade } }; children.Add(new Domain.Membership.Child { Nickname = c.Nickname, Issues = issues, Grades = grades }); } Guid preferredLanguage = new Guid(); if (rbLanguageSpanish.Checked) { preferredLanguage = Constants.Language_Spanish; } else { preferredLanguage = Constants.Language_English_US;; } Member member = new Member { Email = _submission.Email, Children = children, Interests = interests, PreferredLanguage = preferredLanguage, allowNewsletter = true }; // TODO: add error handling MembershipManager mm = new MembershipManager(); if (member.Children.Count > 0) { mm.AddUnauthorizedMember(member); mm.UpdateMember_ExtendedProperties(member); //bg: Hereya go joe. } BaseReply reply = ExactTargetService.InvokeEM7NewsletterConfirmation(new InvokeEM7NewsletterConfirmationRequest { PreferredLanguage = new Guid(), ToEmail = member.Email, ConfirmSubscriptionLink = "www.google.com", WeekDay = "sunday", RequestUrl = Request.Url }); Item next = Sitecore.Context.Database.GetItem(Constants.Pages.NewsletterConfirmation); if (next != null) { Response.Redirect(next.GetUrl()); } }