protected void Page_Load(object sender, EventArgs e) { _EmailListId = AlwaysConvert.ToInt(Request.QueryString["EmailListId"]); _EmailList = EmailListDataSource.Load(_EmailListId); if (_EmailList == null) { Response.Redirect("Default.aspx"); } if (!Page.IsPostBack) { Caption.Text = string.Format(Caption.Text, _EmailList.Name); EmailListUsersCaption.Text = string.Format(EmailListUsersCaption.Text, _EmailList.Name); SearchUsersGrid.Visible = false; if (Request.UrlReferrer.AbsolutePath.EndsWith("ManageList.aspx")) { FinishLink.NavigateUrl = "ManageList.aspx?EmailListId=" + _EmailListId; } } AlphabetRepeater.DataSource = GetAlphabetDS(); AlphabetRepeater.DataBind(); AbleCommerce.Code.PageHelper.SetDefaultButton(SearchEmail, SearchButton.ClientID); IList <Group> storeGroups = GroupDataSource.LoadAll(); SearchGroup.DataSource = storeGroups; SearchGroup.DataTextField = "Name"; SearchGroup.DataValueField = "GroupId"; SearchGroup.DataBind(); }
protected void Page_Init(object sender, EventArgs e) { AlphabetRepeater.DataSource = GetAlphabetDS(); AlphabetRepeater.DataBind(); _IconPath = AbleCommerce.Code.PageHelper.GetAdminThemeIconPath(this.Page); }
protected void Page_Init(object sender, EventArgs e) { AddCountryDialog1.ItemAdded += new EventHandler(AddCountryDialog1_ItemAdded); AlphabetRepeater.DataSource = GetAlphabetDS(); AlphabetRepeater.DataBind(); string alphabet = Request.QueryString["c"]; if (string.IsNullOrEmpty(alphabet) || alphabet == "All") { alphabet = string.Empty; } ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "searchQueryAlphabet", "var searchedAlphabet = '" + alphabet + "';", true); }
protected void Page_Init(object sender, EventArgs e) { AlphabetRepeater.DataSource = GetAlphabetDS(); AlphabetRepeater.DataBind(); // EXTRA MEASURE TO PROTECT AGAINST MISCONFIGURED SECURITY POLICY if (!AbleContext.Current.User.IsAdmin) { AbleCommerce.Code.NavigationHelper.Trigger403(Response, "Admin user rights required."); } // INITIALIZE PAGE ELEMENTS UploadMaxSize.Text = String.Format(UploadMaxSize.Text, AbleContext.Current.Store.Settings.MaxRequestLength); ActivationMode.SelectedIndex = 2; UploadFileTypes.Text = AbleContext.Current.Store.Settings.FileExt_DigitalGoods; //string setNamesScript = @"var lastName="""";function setNames(){var a=document.getElementById(""" + UploadFile.ClientID + @""").value;if(a.length>0){var b;var c=a.lastIndexOf(""\\"");if(c<0){c=a.lastIndexOf(""/"");if(c<0){b=a}else{b=a.substring(c+1)}}else{b=a.substring(c+1)}var d=document.getElementById(""" + DownloadName.ClientID + @""");if((d.value.length==0)||(d.value==lastName)){b=b.replace(/ /g,""_"");d.value=b;lastName=b}}}"; //ScriptManager.RegisterClientScriptBlock(UploadFile, this.GetType(), "SetNames", setNamesScript, true); }
protected void Page_Init(object sender, EventArgs e) { AlphabetRepeater.DataSource = GetAlphabetDS(); AlphabetRepeater.DataBind(); AbleCommerce.Code.PageHelper.SetDefaultButton(SearchEmail, SearchButton.ClientID); SearchGroup.DataSource = AbleContext.Current.Store.Groups; SearchGroup.DataTextField = "Name"; SearchGroup.DataValueField = "GroupId"; SearchGroup.DataBind(); AddGroup.DataSource = SecurityUtility.GetManagableGroups() .Where(group => group.Name != Group.DefaultUserGroupName); AddGroup.DataBind(); trAddGroup.Visible = AddGroup.Items.Count > 1; if (!Page.IsPostBack) { LoadLastSearch(); } }
protected void Page_Load(object sender, EventArgs e) { _GroupId = AlwaysConvert.ToInt(Request.QueryString["GroupId"]); Group group = GroupDataSource.Load(_GroupId); if (group == null) { Response.Redirect("Default.aspx"); } // ensure user has permission to manage this group IList <Group> managableGroups = SecurityUtility.GetManagableGroups(); if (managableGroups.IndexOf(group) < 0) { Response.Redirect("Default.aspx"); } _IsReadonlyGroup = group.IsReadOnly; _Subscriptions = group.SubscriptionPlans.Count; AlphabetRepeater.DataSource = GetAlphabetDS(); AlphabetRepeater.DataBind(); if (!Page.IsPostBack) { SearchGroup.DataSource = AbleContext.Current.Store.Groups; SearchGroup.DataTextField = "Name"; SearchGroup.DataValueField = "GroupId"; SearchGroup.DataBind(); Caption.Text = string.Format(Caption.Text, group.Name); ListItem item = SearchGroup.Items.FindByValue(_GroupId.ToString()); if (item != null) { Session.Remove("ManageUserSearchCriteria"); SearchGroup.ClearSelection(); item.Selected = true; } LoadLastSearch(); } }
protected void Page_Init(object sender, EventArgs e) { AlphabetRepeater.DataSource = GetAlphabetDS(); AlphabetRepeater.DataBind(); }