private void Page_Load(object sender, System.EventArgs e) { SetupSecurity(); LocalizePage(); // Get selected tab if (!string.IsNullOrEmpty(Request.Params["tabindex"])) { string[] idx = Request.Params["tabindex"].Split(','); selectedTabIndex = int.Parse(idx[idx.Length - 1]); } if (selectedTabIndex > 0) { btnBack.Visible = false; } UsersData = new Votations.NSurvey.SQLServerDAL.User(); SwitchModeDependingOnprevTab(); if (!Page.IsPostBack) { BindFields(); } else { BindGrid(); // postback could be import users } }
/// ----------------------------------------------------------------------------- /// <summary> /// LoadSettings loads the Module settings from the Database and displays them /// </summary> /// ----------------------------------------------------------------------------- public override void LoadSettings() { Votations.NSurvey.SQLServerDAL.User UsersData; try { if (Page.IsPostBack == false) { UsersData = new Votations.NSurvey.SQLServerDAL.User(); //Check for existing settings and use those on this page //Settings["SettingName"] /* uncomment to load saved settings in the text boxes */ //surveyid: if (Settings.Contains("SurveyID")) { txtSurveyID.Text = Settings["SurveyID"].ToString(); } //UserId if (Settings.Contains("UserID")) { txtUserID.Text = Settings["UserID"].ToString(); } ShowSurveyDDL(); ShowUserDDL(); } if (Settings.Contains("SurveyID")) { txtSurveyID.Text = Settings["SurveyID"].ToString(); } //UserId if (Settings.Contains("UserID")) { txtUserID.Text = Settings["UserID"].ToString(); } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }
private void Page_Load(object sender, System.EventArgs e) { MessageLabel.Visible = false; LocalizePage(); UsersData = new SQLServerDAL.User(); // Check if any answer type id has been assigned if (GroupId == -1) { SwitchToCreationMode(); } else { SwitchToEditionMode(); } if (!Page.IsPostBack) { BindGrid(); } }
private void Page_Load(object sender, System.EventArgs e) { SetupSecurity(); LocalizePage(); // Get selected tab if (!string.IsNullOrEmpty(Request.Params["tabindex"])) { string[] idx = Request.Params["tabindex"].Split(','); selectedTabIndex = int.Parse(idx[idx.Length - 1]); } if (selectedTabIndex > 0) btnBack.Visible = false; UsersData = new Votations.NSurvey.SQLServerDAL.User(); SwitchModeDependingOnprevTab(); if (!Page.IsPostBack) { BindFields(); } else BindGrid(); // postback could be import users }