protected void Page_Load(object sender, EventArgs e) { Session["custId"] = ""; se.localize(); labError_1.Text = ""; panConfirmShell.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { se.localize(); if (!IsPostBack) { // get count of learners on file using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["apps"].ConnectionString)) { con.Open(); using (SqlCommand cmd = new SqlCommand()) { cmd.Connection = con; cmd.CommandText = "dbo.sp7learnersExcelCount2"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@StrParm0", se.custId)); cmd.Parameters.Add("@count", SqlDbType.Int).Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); membCount = (int)cmd.Parameters["@count"].Value; } } } labCount.Text = membCount.ToString(); if (membCount == 0) { butBegin.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); // need to show/hide tiles if (!IsPostBack) // start tiles at home group { Session["tileGroup"] = "home"; } else // capture tile click { string targetType = Request["__EVENTTARGET"]; // sender used for target type (1,2,3) string target = Request["__EVENTARGUMENT"]; // parameter used for target Session["pageName"] = target; // link to same tab (typically local app) if (targetType == "1") { //butPageName.Text = target; Response.Redirect(target); } // link to another tab (typically external app) if (targetType == "2") { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('" + target + "','_blank')", true); } // link to another menuGroup if (targetType == "3") { Session["tileGroup"] = target; lvTiles.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); if (!IsPostBack) { populateTitle(); } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); if (!IsPostBack) { populateTitle(); PopulateDropDown(); } Session["progId"] = ddProgs.SelectedValue; }
protected void Page_Load(object sender, EventArgs e) { se.localize(); if (!IsPostBack) { txtCurPwd.Text = txtNewPwd.Text = txtDupPwd.Text = ""; int channelChildren = cu.customerChannelChildren(se.custAcctId); if (channelChildren > 0) { panActive.Visible = true; labCustIdActive.Text = se.custId; labChildrenNo.Text = channelChildren.ToString(); labNewPassword1.Text = se.custId.Substring(0, 4) + "_"; labNewPassword2.Text = se.custId.Substring(0, 4) + "_ADMIN" + DateTime.Now.Year.ToString() + "!"; } else { panInactive.Visible = true; labCustIdInactive.Text = se.custId; } } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); if (!IsPostBack) { vAccounts.Items[0].Text = "Just this Account: <strong>" + se.custId + "</strong>"; vAccounts.Items[0].Value = se.custId; vAccounts.Items[1].Text = "All Accounts starting with <strong>" + se.cust + "</strong>"; vAccounts.Items[1].Value = se.cust; if (se.membLevel == 5) { vAccounts.Items.Add(new ListItem("All Accounts", "")); } } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); if (cu.getEmailAlert(se.custAcctId)) { // labStatus.Text = "ENABLED"; labStatus.Text = GetGlobalResourceObject("portal", "emailAlerts_4").ToString(); butEnable.Visible = false; butDisable.Visible = true; } else { // labStatus.Text = "DISABLED"; labStatus.Text = GetGlobalResourceObject("portal", "emailAlerts_5").ToString(); butEnable.Visible = true; butDisable.Visible = false; } }
protected void imgExcel_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Excel ex = new Excel(); // instantiate the excelwriter se.localize(); // ex.DocName = "Program Activity Details" + " - " + DateTime.Now.ToString("MMM d yyyy"); // excel file name - doesn't like spaces ex.DocName = GetGlobalResourceObject("portal", "progActivity_0").ToString() + " - " + DateTime.Now.ToString("MMM d yyyy"); // excel file name - doesn't like spaces // ex.WsName = "Details"; // this is the worksheet name which shows on the first tab at the bottom ex.WsName = GetGlobalResourceObject("portal", "details").ToString(); // this is the worksheet name which shows on the first tab at the bottom ex.SpName = "[apps].[dbo].[sp7programActivityDetailsExcel]"; // this is the stored proc that drives this - must be "excelWriter" friendly ex.Lang = "en"; // added Nov 27, 2019 to enable translation of column headers retrieved from SQL ex.StrParms[0] = se.custId; ex.StrParms[1] = txtMembId.Text; ex.DatParms[0] = Calendar1.SelectedDate; ex.DatParms[1] = Calendar2.SelectedDate; ex.excelWriter(); }
protected void dvProfile_DataBound(object sender, EventArgs e) { se.localize(); // only display the Password if this account uses them (based on profile) if (se.usesPassword == false) { dvProfile.Rows[3].Visible = false; } Label membLevel = (Label)dvProfile.FindControl("membLevel"); switch (membLevel.Text) { case "1": membLevel.Text = "Guest"; break; case "2": membLevel.Text = "Learner"; break; case "3": membLevel.Text = "Facilitator"; break; case "4": membLevel.Text = "Manager"; break; case "5": membLevel.Text = "Administrator"; break; } if ((bool)dvProfile.DataKey[0]) // hide username and password for internals { Label membId = (Label)dvProfile.FindControl("membId"); membId.Text = "*************"; Label membPwd = (Label)dvProfile.FindControl("membPwd"); membPwd.Text = "*************"; lab2.Visible = true; } else { lab2.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); StatusLabel.Text = ""; if (!IsPostBack) { Session["fileName"] = ""; Session["fullPath"] = ""; Session["fileText"] = ""; } string fileName = se.custId + "_LEARNERS.txt"; labCustId1.Text = fileName; labCustId2.Text = fileName; labCustId3.Text = fileName; // disable option to DELETE ALL unless big admin if (se.membLevel != 5) { radAction.Items.Remove(radAction.Items.FindByValue("99")); } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); labError.Text = ""; // count number of learners to configure the title (store in session variable) int userCount = int.Parse(Session["userCount"].ToString()); if (userCount == 0) { DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty); Session["userCount"] = dv.Count; if (dv.Count == 0) { noLearners.Visible = false; } else if (dv.Count == 1) { noLearners.Text = Session["userCount"] + " " + GetGlobalResourceObject("portal", "noLearners_1").ToString(); } else if (dv.Count == 200) { noLearners.Text = Session["userCount"] + " " + GetGlobalResourceObject("portal", "noLearners_200").ToString(); } else { noLearners.Text = Session["userCount"] + " " + GetGlobalResourceObject("portal", "noLearners_2").ToString(); } } // this is called by javascript to edit the userName if (Request.Form["__EVENTTARGET"] == "ctl00$MainContent$dvLearner$membId") { membIdValidate(); } }
protected void Page_Load(object sender, EventArgs e) { se.localize(); }