void btnSearch_Click(object sender, EventArgs e) { MembershipManager mm = new MembershipManager(); Child child = mm.GetChild(Guid.Parse(ddlChildren.SelectedValue)); _parentInterests = child.Members.FirstOrDefault().Interests.Select(i => Sitecore.Context.Database.GetItem(i.Key)) .Where(i => i != null) .Select(i => i.ID.ToGuid()) .ToList(); string childGrade = string.Empty; var grade = child.Grades.FirstOrDefault(); if (grade != null) { GradeLevelItem gli = Sitecore.Context.Database.GetItem(grade.Key); if (gli != null) { // store value for data bound match _childGuidId = grade.Key; childGrade = gli.Name.Rendered; } } litChild.Text = String.Format("{0} ({1})", child.Nickname, childGrade); var issues = child.Issues.Select(i => Sitecore.Context.Database.GetItem(i.Key)) .Where(i => i != null) .Select(i => new ChildIssueItem(i)); if (issues.Any()) { // store lookup values for data bound match _childIssues = issues.Select(i => i.ID.ToGuid()).ToList(); rptIssues.DataSource = issues; rptIssues.DataBind(); } DateTime specifiedDate = DateTime.Parse(txtDate.Text).Date; var articles = SearchHelper.GetArticles(child.Members.FirstOrDefault(), child, specifiedDate) .Where(i => i.GetItem() != null); if (articles.Any()) { rptArticles.DataSource = articles; rptArticles.DataBind(); } }
public static void RefreshAndSavePersonalizedContent(Guid childId) { DateTime now = DateTime.Now; Child child = null; MembershipManager mm = new MembershipManager(); try { child = mm.GetChild(childId); } catch { } if (child.Members.Any()) { foreach (Member m in child.Members) { RefreshAndSavePersonalizedContent(m, child); } } }
protected void btnE1_Click(object sender, EventArgs e) { MembershipManager mm = new MembershipManager(); Member mem = new Member(); BaseReply reply = ExactTargetService.InvokeE1ATurnAroundBullying(new InvokeE1ATurnAroundBullyingRequest { Child = mm.GetChild(new Guid("1DC558DE-8E46-4973-980A-08F582EAE6D5")), ToEmail = tbxSubscriberEmail1.Text, Member = mem, PreferredLanguage = new Guid(ddlLanguages.SelectedValue) }); lblMessage.Text = reply.Message; }