using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Admin_EditSelector_MemberItems : WebBlocks.AdministrativePage { public int SelectorID { get { return (ViewState["SelectorID"] == null ? 0 : (int)ViewState["SelectorID"]); } set { ViewState["SelectorID"] = value; } } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request["SelectorID"] != null) SelectorID = Int32.Parse(Request["SelectorID"]); custItems.SelectorID = SelectorID; custItems.BindData(); if (Request["ItemID"] != null) { int ItemID = Int32.Parse(Request["ItemID"]); custItems.ShowEditItem(ItemID); } if (Request["Wizard"] != null) { btnSave.Attributes.Add("onclick", "return confirm('Are you sure you want to proceed without adding any products?');"); custItems.ShowAddItems(); } } else btnSave.Attributes.Remove("onclick"); } protected void btnSave_Click(object sender, EventArgs e) { if (Request["Wizard"] != null) { Response.Redirect("EditSelector_Customizations.aspx?Wizard=1&SelectorID=" + SelectorID); } else Response.Redirect("EditSelector_Customizations.aspx?SelectorID=" + SelectorID); } }