/// <summary> /// Method that get called on Page Load /// </summary> /// <param name="sender">Event Source</param> /// <param name="eventArgument">Event Data</param> protected void Page_Load(object sender, EventArgs eventArgument) { DataProvider.AuthorizeUser(); MasterPage masterPage = this.Page.Master; Header headerPage = (Header)masterPage; headerPage.DisplayDataFromMasterPage(Session["UserName"].ToString()); Session["EnableProductSelection"] = true; bool isPortalAdmin = (bool)Session["isPortalAdmin"]; if (isPortalAdmin) { Session["AddAllOption"] = "yes"; } GetMasterPage().FindControl("PanelActionMessage").Visible = false; if (!Page.IsPostBack) { GetRoles(); GetUserRoles(); } else { // Register the event for Product DropDownList in Master Page. DropDownList dropDownListProducts = (DropDownList)headerPage.FindControl("DropDownListProducts"); dropDownListProducts.SelectedIndexChanged += new EventHandler(DropDownListProductsInMasterPage_SelectedIndexChanged); } DropDownListRoles.Focus(); }
/// <summary> /// Method that get called when the Roles DropDownList selection changes /// </summary> /// <param name="sender">Event Source</param> /// <param name="eventArgument">Event Data</param> protected void DropDownListRoles_SelectedIndexChanged(object sender, EventArgs eventArgument) { GetUserRoles(); DropDownListRoles.Focus(); }