private TableRow GetSecondSuperHeader()
        {
            TableRow   tr       = new TableRow();
            TQRelateTo relateTo = GlobalValues.TQRelateTo;

            string org = (GlobalValues.OrgLevel.Key == OrgLevelKeys.School) ? "School" : "District";

            string schoolType = TitleBuilder.GetSchoolTypeInTitle(GlobalValues.STYP);

            if (relateTo.CompareToKey(TQRelateToKeys.Spending))
            {
                WinssDataGrid.AddTableCell(tr, org, 1);
                WinssDataGrid.AddTableCell(tr, "District Spending", 1);
                WinssDataGrid.AddTableCell(tr, "Teacher Data: " + schoolType, 3);

                //relateToDenominatorLabel = "Current Education Cost Per Member";
                relateToLabel = "Current Education Cost Per Member";
            }
            else if (relateTo.CompareToKey(TQRelateToKeys.DistrictSize))
            {
                WinssDataGrid.AddTableCell(tr, org, 1);
                WinssDataGrid.AddTableCell(tr, "District Size", 1);
                WinssDataGrid.AddTableCell(tr, "Teacher Data: " + schoolType, 3);

                relateToDenominatorLabel = "Total Number Enrolled";
            }
            else if (relateTo.CompareToKey(TQRelateToKeys.SchoolSize))
            {
                WinssDataGrid.AddTableCell(tr, org, 1);
                WinssDataGrid.AddTableCell(tr, "School Size: " + schoolType, 1);
                WinssDataGrid.AddTableCell(tr, "Teacher Data: " + schoolType, 3);

                relateToDenominatorLabel = "Total Number Enrolled";
            }
            else
            {
                WinssDataGrid.AddTableCell(tr, org, 1);
                WinssDataGrid.AddTableCell(tr, "Student Data:" + schoolType, 2);
                WinssDataGrid.AddTableCell(tr, "Teacher Data:" + schoolType, 3);

                relateToDenominatorLabel = "Total # Enrolled (PreK-12)**";
            }

            foreach (TableCell cell in tr.Cells)
            {
                cell.BorderColor = System.Drawing.Color.Gray;
                cell.BorderStyle = BorderStyle.Double;
                cell.BorderWidth = 4;
            }

            return(tr);
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String dataType = GlobalValues.HighSchoolCompletion.Key;

            if (GlobalValues.HighSchoolCompletion.Key == HighSchoolCompletionKeys.All)
            {
                dataType = "All Credential Types";
            }

            String prefix = "High School Completion Rate - " + dataType + TitleBuilder.newline + GlobalValues.TmFrm.Key;

            DataSetTitle = GetTitle(prefix);
            String sTypeTitle = TitleBuilder.GetSchoolTypeInTitle(GlobalValues.STYP);

            if (TitleBuilder.GetSchoolTypeInTitle(GlobalValues.STYP) != String.Empty)
            {
                DataSetTitle = DataSetTitle.Replace(sTypeTitle, String.Empty);
            }

            ((WinssDataGrid)DataGrid).AddSuperHeader(DataSetTitle);
            ((WinssDataGrid)DataGrid).AddSuperHeader(GetSecondSuperHeader());

            List <String> dgOrder = QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns);

            //timeframe should be the second sort factor
            dgOrder.Insert(1, v_HSCWWoDisSchoolDistStateEconELPXYearRate.TimeFrameSort);

            barChart.OrderBy = TimeFrameDataGrid.OrderBy = String.Join(",", dgOrder.ToArray());

            set_state();

            if (CountDimensions(SetIsDisaggFlags(GlobalValues)) > 2)
            {
                HideGraphForDisAggOverflow();
            }
            else
            {
                SetUpChart(DataSet);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //show message if the graph is not visible
            pnlMessage.Visible = (Graph.Visible == false);

            DataSetTitle = GetTitleWithoutGroupForSchoolTypeUnsupported(
                ((GlobalValues.WOW.Key == WOWKeys.WSASCombined) ?
                 WOWKeys.WSASCombined : WOWKeys.WKCE)
                + " - " + (
                    (GlobalValues.Grade.Key == GradeKeys.Combined_PreK_12 ||
                     GlobalValues.Grade.Key == GradeKeys.AllDisAgg)
                        ? String.Empty
                        : "Grade "
                    ) + GlobalValues.Grade.Key
                + " - " + GlobalValues.SubjectID.Key + WebSupportingClasses.TitleBuilder.newline
                + GlobalValues.Level.Key
                )
            ;

            DataSetTitle = DataSetTitle.Replace(
                GlobalValues.GetOrgName(),
                GlobalValues.GetOrgName() + "Compared to Other "
                + ((GlobalValues.OrgLevel.Key == OrgLevelKeys.School)? "Schools" : "Districts") + " in "
                + ((GlobalValues.LF.Key == LFKeys.State)? "Entire State" :
                   (GlobalValues.LF.Key == LFKeys.CESA)? "CESA " + GlobalValues.Agency.CESA.Trim() :
                   GlobalValues.Agency.CountyName.Trim()
                   )

                );

            if (GlobalValues.FAYCode.Key == FAYCodeKeys.FAY)
            {
                DataSetTitle = DataSetTitle.Replace(GlobalValues.GetOrgName(), GlobalValues.GetOrgName().Trim() + "  FAY ");
            }

            if (GlobalValues.WOW.Key == WOWKeys.WSASCombined &&
                GlobalValues.Level.Key == LevelKeys.BasicMinSkillEng)
            {
                DataSetTitle = DataSetTitle.Replace("+ WAA SwD/ELL ", String.Empty);
            }

            DataSetTitle =
                DataSetTitle.Replace(TitleBuilder.GetYearRangeInTitle(QueryMarshaller.years),
                                     "November " + (GlobalValues.Year - 1).ToString() + " Data");

            if (GlobalValues.OrgLevel.Key == OrgLevelKeys.School)
            {
                DataSetTitle = DataSetTitle.Replace(TitleBuilder.GetSchoolTypeInTitle(GlobalValues.STYP), String.Empty);
            }

            StateTestsScatterDataGrid.AddSuperHeader(DataSetTitle);
            StateTestsScatterDataGrid.AddSuperHeader(GetSecondSuperHeader());

            List <String> order = QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns);

            order.Insert(0, v_WSAS.School_Name);
            order.Insert(0, v_WSAS.District_Name); //same index is intentional... district, then school
            StateTestsScatterDataGrid.OrderBy = String.Join(", ", order.ToArray());

            StateTestsScatterDataGrid.ForceCurrentFloatToTopOrdering = true;

            SetUpChart();

            set_state();
            setBottomLink();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSetTitle = GetTitleWithoutGroupForSchoolTypeUnsupported(
                ((GlobalValues.WOW.Key == WOWKeys.WSASCombined) ?
                 WOWKeys.WSASCombined : WOWKeys.WKCE)
                + " - " + (
                    (GlobalValues.Grade.Key == GradeKeys.Combined_PreK_12 ||
                     GlobalValues.Grade.Key == GradeKeys.AllDisAgg)
                        ? String.Empty
                        : "Grade "
                    ) + GlobalValues.Grade.Key
                + " - " + GlobalValues.SubjectID.Key
                )
            ;

            DataSetTitle = DataSetTitle.Replace(
                GlobalValues.GetOrgName(),
                "Top Five " + ((GlobalValues.OrgLevel.Key == OrgLevelKeys.School) ? "Schools" : "Districts")
                + " in "
                + ((GlobalValues.LF.Key == LFKeys.State) ? "Entire State" :
                   (GlobalValues.LF.Key == LFKeys.CESA) ? "CESA " + GlobalValues.Agency.CESA.Trim() :
                   GlobalValues.Agency.CountyName.Trim()
                   )
                + ((GlobalValues.Sim.Key == SimKeys.Outperform)? " Outperforming " :  " Similar to ")
                + WebSupportingClasses.TitleBuilder.newline + GlobalValues.GetOrgName()
                + WebSupportingClasses.TitleBuilder.newline
                + " Sorted by " + GlobalValues.SORT.Key
                );

            if (GlobalValues.FAYCode.Key == FAYCodeKeys.FAY)
            {
                DataSetTitle = DataSetTitle.Replace(GlobalValues.GetOrgName(), GlobalValues.GetOrgName().Trim() + "  FAY ");
            }

            DataSetTitle =
                DataSetTitle.Replace(TitleBuilder.GetYearRangeInTitle(QueryMarshaller.years),
                                     "November " + (GlobalValues.Year - 1).ToString() + " Data");

            if (GlobalValues.OrgLevel.Key == OrgLevelKeys.School)
            {
                DataSetTitle = DataSetTitle.Replace(TitleBuilder.GetSchoolTypeInTitle(GlobalValues.STYP), String.Empty);
            }

            DataSetTitle = DataSetTitle.Replace(TitleBuilder.GetCompareToInTitle(GlobalValues.OrgLevel, GlobalValues.CompareTo, GlobalValues.STYP, GlobalValues.S4orALL, WebSupportingClasses.TitleBuilder.GetRegionString(GlobalValues)), String.Empty);

            if (GlobalValues.Sim.Key != SimKeys.Default)
            {
                DataSetTitle = DataSetTitle
                               .Replace("Top Five ", "All "
                                        + ((GlobalValues.Sim.Key == SimKeys.AllSimilar) ? String.Empty : "Similar ")
                                        );
            }

            SimilarDataGrid.AddSuperHeader(DataSetTitle);
            SimilarDataGrid.AddSuperHeader(GetSecondSuperHeader());

            SimilarDataGrid.OrderBy = String.Empty; //disable default order by and let SQL take over

            SetUpChart();
            barChart.OrderBy = String.Empty; //disable default order by and let SQL take over
            if (GlobalValues.Sim.Key != SimKeys.Default)
            {
                barChart.Visible = false;
            }

            if (GlobalValues.Sim.Key != SimKeys.Default)
            {
                SimilarDefPanel.Visible = true;
                SimilarDefLabel.Text    = SimilarDefinitionDescription().Replace("\n", "<br />");
            }

            set_state();
            setBottomLink();
        }