private void PopulateControls() { if (letterInfoGuid == Guid.Empty) { btnOptInUsers.Visible = false; return; } letterInfo = new LetterInfo(letterInfoGuid); heading.Text = letterInfo.Title; countOfAvailableUsers = SubscriberRepository.CountUsersNotSubscribedByLetter( CurrentSite.SiteGuid, letterInfoGuid, WebConfigSettings.NewsletterExcludeAllPreviousOptOutsWhenOptingInUsers); btnOptInUsers.Text = string.Format(CultureInfo.InvariantCulture, Resource.NewsLetterOptInMembersFormat, countOfAvailableUsers); }
private void PopulateControls() { if (letterInfoGuid == Guid.Empty) { return; } letterInfo = new LetterInfo(letterInfoGuid); lnkThisPage.Text = string.Format(CultureInfo.InvariantCulture, Resource.NewsletterSubscriberListHeadingFormatString, letterInfo.Title); lnkThisPage.ToolTip = lnkThisPage.Text; heading.Text = lnkThisPage.Text; Title = heading.Text; int countOfUsersThatCouldOptIn = SubscriberRepository.CountUsersNotSubscribedByLetter( siteSettings.SiteGuid, letterInfoGuid, WebConfigSettings.NewsletterExcludeAllPreviousOptOutsWhenOptingInUsers); if (countOfUsersThatCouldOptIn > 0) { lnkOptIn.Visible = true; lnkOptIn.Text = string.Format(CultureInfo.InvariantCulture, Resource.NewsLetterOptInMembersFormat, countOfUsersThatCouldOptIn); } if (Page.IsPostBack) { return; } BindGrid(); }