public string GetQueryStringForMultipleParams( string fullkey, string SchoolName, string DistrictName, string SchoolType, string LowGrade, string HighGrade, string orgLevel ) { string result = String.Empty; // First get QueryString from GlobalValues, also set the new fullkey value result = UserValues.GetQueryString("FULLKEY", fullkey); // then replace or append addtional params and values result = QueryStringUtils.ReplaceQueryString(result, "SN", SchoolName); result = QueryStringUtils.ReplaceQueryString(result, "DN", DistrictName); //shouldn't be setting STYP in initial agency selection pages. // result = QueryStringUtils.ReplaceQueryString(result, GlobalValues.STYP.Name, SchoolType); result = QueryStringUtils.ReplaceQueryString(result, "LOWGRADE", LowGrade); result = QueryStringUtils.ReplaceQueryString(result, "HIGHGRADE", HighGrade); result = QueryStringUtils.ReplaceQueryString(result, GlobalValues.OrgLevel.Name, GlobalValues.OrgLevel.Range[orgLevel]); return(result); }
private void set_list_item_link(string link_text, string nav_file_path, list_items placeholder_name) { ContentPlaceHolder CPH = (ContentPlaceHolder)this.Page.Master.FindControl("ContentPlaceHolder1"); string controlID = placeholder_name.ToString(); HyperLink list_item_link = new HyperLink(); list_item_link.ID = placeholder_name + "_link"; list_item_link.Text = link_text; String[] path = Page.Request.FilePath.Split("/".ToCharArray()); String file = path[path.Length - 1]; String queryString = UserValues.GetQueryString("Qquad", file); list_item_link.NavigateUrl = nav_file_path + queryString; list_item_link.Visible = true; Control c = CPH.FindControl(controlID); if (c != null) { c.Controls.Add(list_item_link); c.Visible = true; } }
protected void BackToGraph_Click(object sender, EventArgs e) { List <String> parameters = new List <string>(); String selectedFullkeys = (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools)? GlobalValues.SSchoolFullKeys : GlobalValues.SDistrictFullKeys ; String paramName = (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools)? "SSchoolFullKeys" : "SDistrictFullKeys" ; parameters.Add( String.Format(paramFormat, paramName, selectedFullkeys) ); parameters.Add( String.Format(paramFormat, GlobalValues.S4orALL.Name, GlobalValues.S4orALL.Range[S4orALLKeys.FourSchoolsOrDistrictsIn]) ); parameters.Add("B2G=1"); if (GlobalValues.GraphFile.Key != GraphFileKeys.BLANK_REDIRECT_PAGE) { Response.Redirect("~/" + GlobalValues.GraphFile.Key + UserValues.GetQueryString(parameters.ToArray()), true); } }
private void RedirectUserAndSetS4OrAll(List <String> parameters) { String link; if (RadioAllSchools.Checked) { parameters.Add( String.Format(paramFormat, GlobalValues.S4orALL.Name, GlobalValues.S4orALL.Range[S4orALLKeys.AllSchoolsOrDistrictsIn]) ); link = "~/" + GlobalValues.GraphFile.Key; } else if (Radio4Schools.Checked) { parameters.Add( String.Format(paramFormat, GlobalValues.S4orALL.Name, GlobalValues.S4orALL.Range[S4orALLKeys.FourSchoolsOrDistrictsIn]) ); link = "~/ChooseSelectedList.aspx"; } else { throw new Exception("S4 Or All not Set"); } Response.Redirect(link + UserValues.GetQueryString(parameters.ToArray()), true); }
public String GetQueryString(String[] Params) { if (Params != null) { return(UserValues.GetQueryString(Params)); } else { return(UserValues.GetBaseQueryString()); } }
/// <summary> /// callback-like function for setting navigation links. designed for call from loop through control collection. /// </summary> /// <param name="theLink"></param> public void setNavigationlinkURL(Control theCtrl) { HyperLinkPlus theLink = (HyperLinkPlus)theCtrl; string urlFile; if (UserValues == null || GlobalValues == null) { throw new Exception("SetNavigationLinkURL, prerequisites not met."); } //We want the same URL as the current page, except change the value for my globalValues. string qstring = UserValues.GetQueryString(theLink.ParamName, theLink.ParamValue); urlFile = (theLink.UrlFile == null) ? Request.Url.LocalPath : Request.ApplicationPath + ((theLink.UrlFile.StartsWith("/")) ? theLink.UrlFile : "/" + theLink.UrlFile ); string url = string.Format("{0}{1}", urlFile, qstring); theLink.NavigateUrl = url; //If the current user's context is already set to use this param/value, //disable this LinkButtonPlus. //E.g. if this LinkButtonPlus is set for STYP=1, and the current // user context is set to STYP=1, then disable this. System.Reflection.PropertyInfo propertyInfo = GlobalValues.GetType(). GetProperty(theLink.ParamName, System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.IgnoreCase); SetNavigationLinkSelectedStatus(propertyInfo, theLink); }
public string GetQueryStringForAdding(String name, String value) { return(UserValues.GetQueryString(name, value)); }
private void decommissionedPagesRedirect() { string graphFileKey = GlobalValues.GraphFile.Key; switch (graphFileKey) { case GraphFileKeys.ACT: Response.Redirect("http://wisedash.dpi.wi.gov/Dashboard/Page/Home/Topic%20Area/Academic%20Performance/ACT", true); break; case GraphFileKeys.AP: Response.Redirect("http://wisedash.dpi.wi.gov/Dashboard/Page/Home/Topic%20Area/Academic%20Performance/AP", true); break; case GraphFileKeys.ATTENDANCE: Response.Redirect("http://wisedash.dpi.wi.gov/Dashboard/Page/Home/Topic%20Area/Attendance/", true); break; case GraphFileKeys.StateTests: case GraphFileKeys.StateTestsScatter: case GraphFileKeys.StateTestsSimilar: case GraphFileKeys.CompareContinuing: Response.Redirect("http://wisedash.dpi.wi.gov/Dashboard/Page/Home/Topic%20Area/Academic%20Performance/WSAS%20%28WKCE%20and%20WAA-SwD%29", true); break; case GraphFileKeys.DISABILITIES: Response.Redirect("http://wisedash.dpi.wi.gov/Dashboard/Page/Home/Topic%20Area/Enrollment/Enrollment%20(Single%20Year)?pf:DatasetView=Current&pf:GroupBy=Primary%20Disability", true); break; case GraphFileKeys.GROUPS: Response.Redirect("http://wisedash.dpi.wi.gov/Dashboard/Page/Home/Topic%20Area/Enrollment/", true); break; case GraphFileKeys.HIGHSCHOOLCOMPLETION: Response.Redirect("http://wisedash.dpi.wi.gov/Dashboard/Page/Home/Topic%20Area/Graduation/", true); break; case GraphFileKeys.GWRCT: string NavigateUrl = GlobalValues.CreateURL("~/performance.aspx", UserValues.GetQueryString(GlobalValues.GraphFile.Name, String.Empty)); Response.Redirect(NavigateUrl); break; case GraphFileKeys.ActivityOffer: case GraphFileKeys.ActivitiesPartic: if (GlobalValues.Show.Key == ShowKeys.Community) { Response.Redirect("http://apps2.dpi.wi.gov/sdpr/redirect?topic=community-activities" + GlobalValues.SdprQS); } else if (GlobalValues.Show.Key == ShowKeys.Extracurricular) { Response.Redirect("http://apps2.dpi.wi.gov/sdpr/redirect?topic=extra-curricular-activities" + GlobalValues.SdprQS); } break; case GraphFileKeys.TRUANCY: Response.Redirect("http://apps2.dpi.wi.gov/sdpr/redirect?topic=habitual-truancy" + GlobalValues.SdprQS); break; case GraphFileKeys.POSTGRADPLAN: Response.Redirect("http://apps2.dpi.wi.gov/sdpr/redirect?topic=postgrad-plans" + GlobalValues.SdprQS); break; case GraphFileKeys.GGRADREQS: Response.Redirect("http://apps2.dpi.wi.gov/sdpr/redirect?topic=hs-grad-req" + GlobalValues.SdprQS); break; case GraphFileKeys.RETENTION: Response.Redirect("http://apps2.dpi.wi.gov/sdpr/redirect?topic=retention" + GlobalValues.SdprQS); break; } }