void RedirectToSimilar_OnCheckPrerequisites(PageBaseWI page, EventArgs args) { if (GlobalValues.CompareTo.Key == CompareToKeys.SimSchools) { OnRedirectUser += new RedirectUserHandler(RedirectToSimilar_OnRedirectUser); } }
void TeacherQualificationsScatterPlot_OnCheckPrerequisites(PageBaseWI page, EventArgs args) { if (GlobalValues.OrgLevel.Key == OrgLevelKeys.State) { return; } if (FullKeyUtils.GetOrgLevelFromFullKeyX(GlobalValues.FULLKEY).Key == OrgLevelKeys.State) { OnRedirectUser += InitialAgencyRedirect; } }
void StateTestsSimilarSchools_OnCheckPrerequisites(PageBaseWI page, EventArgs args) { if (GlobalValues.OrgLevel.Key == OrgLevelKeys.State) { return; } if (FullKeyUtils.GetOrgLevelFromFullKeyX(GlobalValues.FULLKEY).Key == OrgLevelKeys.State) { OnRedirectUser += InitialAgencyRedirect; } }
public static List <String> getGradeCodeRange(PageBaseWI Page) { List <String> codes = new List <String>(); QueryMarshaller qm = new QueryMarshaller(Page.GlobalValues); Page.GlobalValues.SQL = DALWSAS.WSASGrades(qm); qm.AssignQuery(new DALWSAS(), Page.GlobalValues.SQL); DataSet result = qm.Database.DataSet.Copy(); if (result == null || result.Tables[0].Rows.Count == 0) { return(codes); } //throw new Exception(tbl.GetLength(0).ToString() + " || " + tbl[0][0].ToString()); foreach (DataRow row in result.Tables[0].Rows) { codes.Add(row[0].ToString()); } //disable all tested: String disag = Page.GlobalValues.Grade.Range[GradeKeys.AllDisAgg]; if (codes.Contains(disag)) { codes.Remove(disag); } //unsupported grade by Subject: string[] unsupported = { Page.GlobalValues.Grade.Range[GradeKeys.Grade_3], Page.GlobalValues.Grade.Range[GradeKeys.Grade_5], Page.GlobalValues.Grade.Range[GradeKeys.Grade_6], Page.GlobalValues.Grade.Range[GradeKeys.Grade_7] }; if (Page.GlobalValues.SubjectID.Key == SubjectIDKeys.Language || Page.GlobalValues.SubjectID.Key == SubjectIDKeys.Science || Page.GlobalValues.SubjectID.Key == SubjectIDKeys.SocialStudies) { int i = 0; for (i = 0; i < unsupported.Length; i++) { codes.Remove(unsupported[i]); } } return(codes); }
protected void Page_Load(object sender, EventArgs e) { if (bool.Parse(ConfigurationManager.AppSettings["GenericCsvName"])) { Url = ResolveUrl("~/serveRawDataCsv.aspx"); } else { Url = ResolveUrl("~/" + Session["RawCsvName"]); } PageBaseWI page = ((PageBaseWI)Page); SupDwnld supDwnld = page.GlobalValues.SuperDownload; StatewideDownloadUrl = Request.Url.LocalPath + page.UserValues.GetQueryString(supDwnld.Name, supDwnld.Range[SupDwnldKeys.True]); pnlStatewideDownload.Visible = showStatewideDownloadPanel(); }
protected void SchoolScript_OnCheckPrerequisites(PageBaseWI page, EventArgs e) { //loosely setting prerequisites to any of required parameters... may want to restrict more? if ( (Request.QueryString["HS"] != null) || (Request.QueryString["L"] != null) //|| //(Request.QueryString["FULLKEY"] != null) || (Request.QueryString["SEARCHTYPE"] != null) ) { return; } GlobalValues.ShortCircuitRedirectTests = false; //else: OnRedirectUser += new RedirectUserHandler(SchoolScript_OnRedirectUser); }
/// <summary> /// Sets the link text for "School", "District", and "State" on the left hand side of page. /// Per comments in bug 513 Comment 3 /// </summary> private void SetLeftHandLinksText() { string schoolName = string.Empty; string districtName = string.Empty; string school_NavigateUrl = string.Empty; string district_NavigateUrl = string.Empty; string queryString = user.GetBaseQueryString(); string schoolType = string.Empty; linkState.ForeColor = System.Drawing.Color.White; //if (Page is PageBaseWI) PageBaseWI typedPage = (PageBaseWI)Page; schoolName = typedPage.GlobalValues.Agency.Schoolname; districtName = typedPage.GlobalValues.Agency.DistrictName; if (!String.IsNullOrEmpty(schoolName)) { linkSchool.Text = schoolName; queryString = QueryStringUtils.ReplaceQueryString(queryString, globals.OrgLevel.Name, globals.OrgLevel.Range[OrgLevelKeys.School]); if (globals.OrgLevel.Key != OrgLevelKeys.School && user.OrgLevel.Key == OrgLevelKeys.School) {//detect override of state linkSchool.Visible = false; } else if (globals.OrgLevel.Key == OrgLevelKeys.School) { school_NavigateUrl = String.Empty; } else { school_NavigateUrl = queryString.ToString(); } } else { linkSchool.Text = "Show Schools"; school_NavigateUrl = globals.CreateURL("~/SchoolScript.aspx", globals.GetQueryString("SEARCHTYPE", "SC")); } linkSchool.NavigateUrl = school_NavigateUrl; // linkDistrict.Text = districtName; if (!String.IsNullOrEmpty(districtName) && districtName.Trim() != "Entire State") { linkDistrict.Text = districtName; queryString = QueryStringUtils.ReplaceQueryString(queryString, globals.OrgLevel.Name, globals.OrgLevel.Range[OrgLevelKeys.District]); if (Request.QueryString["OrgLevel"] != null) { if (Request.QueryString["OrgLevel"].ToString() != string.Empty) { if (globals.OrgLevel.Key != OrgLevelKeys.District && user.OrgLevel.Key == OrgLevelKeys.District) {//detect override of state linkDistrict.Visible = false; } else if (globals.OrgLevel.Key == OrgLevelKeys.District) { district_NavigateUrl = String.Empty; } else { district_NavigateUrl = queryString.ToString(); } } } } else { linkDistrict.Text = "None Chosen"; } linkDistrict.NavigateUrl = district_NavigateUrl; if (globals.CompareTo.Key == CompareToKeys.SelSchools || globals.CompareTo.Key == CompareToKeys.SelDistricts) { linkState.Visible = false; } if (globals.OrgLevel.Key != OrgLevelKeys.State && user.OrgLevel.Key == OrgLevelKeys.State) { // Detect an override linkState.Visible = false; } }