protected void Page_Load(object sender, EventArgs e) { MessagePanel.Visible = false; Message.Text = String.Format( "Only four (4) {0} can be selected at a time. You must remove a currently selected {0} in the list on the right by clicking on the name before you can add another {0}.", (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools) ? "schools" : "districts" ); set_state(); if (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools) { selectedFullkeys = GlobalValues.SSchoolFullKeys; } if (GlobalValues.CompareTo.Key == CompareToKeys.SelDistricts) { selectedFullkeys = GlobalValues.SDistrictFullKeys; } selectedFullkeys = ProcessUserRequest(selectedFullkeys); PersistSelection(selectedFullkeys); populateAvailableSchoolsGrid( BLUtil.GetCommaDeliFullKeyString(selectedFullkeys + FullKeyUtils.GetMaskedFullkey(GlobalValues.FULLKEY, GlobalValues.OrgLevel)) ); populateSelectedGrid( BLUtil.GetCommaDeliFullKeyString(selectedFullkeys) ); }
private String GetLegendTitleText() { if (GlobalValues.Group2.Key == Group2Keys.None) { return(String.Empty); } String title = String.Empty; if (GlobalValues.Group2.Key == Group2Keys.DistrictSpending) { title = "District Current Education Cost per Member"; } else if (GlobalValues.Group2.Key == Group2Keys.DistrictSize) { title = "District Size -- Number of Students Enrolled"; } else { title = GlobalValues.Group2.Key + " FAY"; } DataRow[] data = DataSet.Tables[0].Select("fullkey = '" + FullKeyUtils.GetMaskedFullkey(GlobalValues.FULLKEY, GlobalValues.OrgLevel) + "'"); if (data.Length != 1) { return(title); } int col = data[0].Table.Columns.IndexOf(GetSeriesColumnName()); String val = String.Empty; if (col > -1) { val = data[0].ItemArray[col].ToString(); } if (GlobalValues.Group2.Key == Group2Keys.DistrictSpending || GlobalValues.Group2.Key == Group2Keys.DistrictSize) { String frmt; if (GlobalValues.Group2.Key == Group2Keys.DistrictSpending) { frmt = "{0:$#,###}"; } else //if (GlobalValues.Group2.Key == Group2Keys.DistrictSize) { frmt = "{0:#,###}"; } try { val = String.Format(frmt, Convert.ToDecimal(val)); //format doesn't work properly on a string } catch { } } else { val = val + "%"; } title = title + WebSupportingClasses.TitleBuilder.newline + "Current Value = " + val; return(title); }