protected void Page_Load(object sender, EventArgs e)
        {
            DataSetTitle = "Postgraduation Plans - " + GlobalValues.PostGradPlan.Key;
            DataSetTitle = GetTitleForSchoolTypeUnsupported(DataSetTitle);

            PostGradDataGrid.AddSuperHeader(DataSetTitle);

            if (GlobalValues.PostGradPlan.Key == PostGradPlanKeys.All)
            {
                SetUpHorizChart();
            }
            else
            {
                SetUpBarChart();
            }

            if (GlobalValues.Group.Key == GroupKeys.Race)
            {
                List <String> grOrder = new List <string>(QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns));

                if (GlobalValues.CompareTo.Key == CompareToKeys.Years)
                { //so race codes that vary across years can be sorted together
                    grOrder.Insert(0, v_POST_GRAD_INTENT.RaceShortLabel);
                }
                else
                {
                    grOrder.Insert(0, v_POST_GRAD_INTENT.Race);
                }

                horizChart.OrderBy = String.Join(",", grOrder.ToArray());
            }

            set_state();
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <String> order =
                new List <String>(QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns).ToArray());

            order.Add(v_StaffFull.Category);
            StaffDataGrid.OrderBy = barChart.OrderBy = String.Join(",", order.ToArray());

            DataSetTitle =
                (GlobalValues.StaffRatio.Key == StaffRatioKeys.Staff) ?
                v_StaffFull.FTE_Staff_per_100_Students :
                v_StaffFull.Ratio_of_Students_to_FTE_Staff
            ;
            DataSetTitle = GetTitleWithoutGroupForSchoolTypeUnsupported(DataSetTitle);

            StaffDataGrid.AddSuperHeader(DataSetTitle);


            if (GlobalValues.StaffRatio.Key == StaffRatioKeys.Staff)
            {
                SetUpChart_Staff(DataSetTitle);
            }
            else
            {
                SetUpChart_Students(DataSetTitle);
            }

            setBottomLink();
            set_state();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            nlrGrade.LinkControlAdded += DisableGradeLinks;

            String[] title = new String[7];
            title[0] = "Enrollment in";
            title[1] = GlobalValues.CourseTypeID.Key;
            if (GlobalValues.CourseTypeID.Key != CourseTypeIDKeys.Other)
            {
                title[2] = "Courses";
            }
            title[3]     = TitleBuilder.newline;
            title[4]     = GlobalValues.WMAS.Key;
            title[5]     = TitleBuilder.GetGradeTitle();
            DataSetTitle = GetTitleForSchoolTypeUnsupported(String.Join(" ", title));
            CoursesTakingDataGrid.AddSuperHeader(DataSetTitle);

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

            order.Add(v_COURSEWORK.Course);

            CoursesTakingDataGrid.OrderBy = String.Join(",", order.ToArray());

            set_state();
            setBottomLink();
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String[] prefix = new String[2];
            prefix[0] = "Graduation Requirements";

            GRSbj subjs = GlobalValues.GRSbj;

            if (subjs.Key == GRSbjKeys.Additional)
            {
                prefix[1] = "Additional Subjects";
            }
            else
            {
                prefix[1] = "Required Subjects";
            }

            DataSetTitle = GetTitleWithoutGroupForSchoolTypeUnsupported(String.Join(" - ", prefix));

            GradReqsDataGrid.AddSuperHeader(DataSetTitle);

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

            order.Add(v_Grad_Reqs.Subjectid);

            GradReqsDataGrid.OrderBy = barChart.OrderBy = String.Join(",", order.ToArray());

            GraphPanel.Visible = false;
            if (GlobalValues.OrgLevel.Key == OrgLevelKeys.State)
            {
                SetUpChart(DataSetTitle);
            }
            set_state();
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSetTitle = GetTitleWithoutGroupForSchoolTypeUnsupported("Post Expulsion - Length of Expulsion");

            PostExpulsionDataGrid.AddSuperHeader(DataSetTitle);

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

            order.Insert(1, vExpulsionServices.Expulsion_Type);
            PostExpulsionDataGrid.OrderBy = String.Join(",", order.ToArray());

            set_state();

            SetUpChart(DataSetTitle);
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSetTitle = GetTitle();

            TQDataGrid.AddSuperHeader(DataSetTitle);

            //Add a 2nd Super Header if Show = Wisconsin State License.
            TQDataGrid.AddSuperHeader(GetSecondSuperHeader());

            set_state();
            setBottomLink();

            if (GlobalValues.CompareTo.Key == CompareToKeys.Years)
            {
                List <String> order = new List <String>(QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns).ToArray());
                order.Insert(0, v_TeacherQualifications.Year);
                barChart.OrderBy = String.Join(",", order.ToArray());
            }

            SetUpChart(DataSet);
        }
Exemplo n.º 7
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);
            }
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            nlrCourseTypeID.LinkControlAdded += CourseTypeIDLinkAdded;

            // no graph code needed

            StringBuilder title = new StringBuilder();

            title.Append("Advanced Course Offerings - ");
            title.Append(GlobalValues.CourseTypeID.Key + " Courses");
            title.Append(TitleBuilder.newline + GlobalValues.WMAS.Key);
            DataSetTitle = GetTitleWithoutGroupForSchoolTypeUnsupported(title.ToString());
            CourseOfferDataGrid.AddSuperHeader(DataSetTitle);

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

            order.Add(v_COURSE_OFFERINGS.Course);

            CourseOfferDataGrid.OrderBy = String.Join(",", order.ToArray());

            set_state();
            setBottomLink();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSetTitle = (GlobalValues.Show.Key == ShowKeys.Community)
           ? GetTitleWithoutGroup("School -Sponsored Community Activities")
            : GetTitleWithoutGroup("Extra-Co-Curricular Activities");

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

            if (GlobalValues.STYP.Key == STYPKeys.AllTypes && GlobalValues.CompareTo.Key == CompareToKeys.Current)
            {
                order.Remove(v_ActivitiesSchoolDistState.LinkedName);
                order.Insert(0, v_ActivitiesSchoolDistState.SchooltypeLabel);
            }
            order.Insert(1, v_ActivitiesSchoolDistState.ActivityLabel);
            ActivitiesDataGrid.OrderBy = String.Join(",", order.ToArray());

            SetUpChart(DataSetTitle);

            set_state();

            setBottomLink();
        }
Exemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string title = "WRCT* - Grade 3 - Reading " + WebSupportingClasses.TitleBuilder.newline + GlobalValues.Level.Key;

            DataSetTitle = GetTitleWithoutGroupForSchoolTypeUnsupported(title);
            DataSetTitle = DataSetTitle.Replace(
                TitleBuilder.GetYearRangeInTitle(new List <String> (new String[] { GlobalValues.Year.ToString() })),
                "March " + GlobalValues.Year.ToString() + " Results");

            WrctDataGrid.AddSuperHeader(DataSetTitle);

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

            if (GlobalValues.OrgLevel.Key == OrgLevelKeys.School)
            {
                order.Insert(0, v_WRCT.OrgSchoolTypeLabel);
            }
            WrctDataGrid.OrderBy = String.Join(",", order.ToArray());
            barChart.OrderBy     = String.Join(",", order.ToArray());

            SetUpChart();

            set_state();
        }
        private void SetUpHorizChart(DataSet ds)
        {
            try
            {
                if (GlobalValues.Group.Key == GroupKeys.Grade)
                {
                    //override the default orderby since will use GradeLabel, instead of GradeCode
                    List <String> order = new List <String>(QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns).ToArray());
                    hrzBarChart.OrderBy = String.Join(",", order.ToArray());
                }
                else if (GlobalValues.Group.Key == GroupKeys.Race)
                {
                    List <String> grOrder = new List <string>(QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns).ToArray());
                    grOrder.Insert(1, v_SuspExpIncidentsWWoDisSchoolDistState.Race);

                    hrzBarChart.OrderBy = String.Join(",", grOrder.ToArray());
                }

                hrzBarChart.YAxisSuffix = String.Empty;
                hrzBarChart.Title       = DataSetTitle;

                if (GlobalValues.Group.Key == GroupKeys.Grade)
                {
                    hrzBarChart.AutoHeightIncreaseFactor = 25;
                }

                if (GlobalValues.CompareTo.Key == CompareToKeys.Current)
                {
                    hrzBarChart.LabelColumns.Add(
                        (GlobalValues.OrgLevel.Key == OrgLevelKeys.School)?
                        v_SuspExpIncidentsWWoDisSchoolDistState.School_Name
                        : v_SuspExpIncidentsWWoDisSchoolDistState.District_Name
                        );
                }
                else
                {
                    hrzBarChart.LabelColumns.Add(ColumnPicker.GetCompareToColumnName(GlobalValues));
                }

                if (GlobalValues.Group.Key != GroupKeys.All)
                {
                    hrzBarChart.LabelColumns.Add(ColumnPicker.GetViewByColumnName(GlobalValues));
                }

                if (GlobalValues.CompareTo.Key != CompareToKeys.SelDistricts &&
                    GlobalValues.CompareTo.Key != CompareToKeys.SelSchools)
                {
                    hrzBarChart.SelectedSortBySecondarySort = false;
                }

                hrzBarChart.OverrideSeriesLabels = new Hashtable(6);

                //MEASURE COLUMNS:
                if (GlobalValues.Weapon.Key == WeaponKeys.Yes)
                {
                    hrzBarChart.MeasureColumns = new List <String>(new String[]
                    {
                        v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugAllSusp,
                        v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugExp
                    });
                    hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugAllSusp, "% Suspended");
                    hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugExp, "% Expelled");
                }
                else
                {
                    hrzBarChart.MeasureColumns = new List <String>(new String[]
                    {
                        v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugAllSusp,
                        v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugExp
                    });
                    hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugAllSusp, "% Suspended");
                    hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugExp, "% Expelled");
                }

                hrzBarChart.AxisYDescription = "Percent of Incidents";
            }
            catch (Exception ex)
            {
                if (GlobalValues.TraceLevels > 0)
                {
                    throw ex;
                }
                System.Diagnostics.Debug.WriteLine(ex.Message);
            }
        }
Exemplo n.º 12
0
        protected virtual String GenerateRawCsvData(DataSet ds)
        {
            StringBuilder        data   = new StringBuilder();
            List <String>        labels = new List <string>();
            DataColumnCollection dsCols = ds.Tables[0].Columns;
            DataTable            dt     = ds.Tables[0];

            //replicated from WinssDataGrid onDataBind
            // sort the Data:
            String orderBy = String.Empty;

            Boolean secondarySort = ((WinssDataGrid)datagrid).SelectedSortBySecondarySort;

            orderBy = ((WinssDataGrid)datagrid).OrderBy;

//            throw new Exception(orderBy);

            if (string.IsNullOrEmpty(orderBy))
            {
                orderBy =
                    SligoCS.DAL.WI.SQLHelper.ConvertToCSV(
                        queryMarshaller.BuildOrderByList(dsCols), false
                        );
            }

            orderBy = orderBy.Replace("year ASC", "year DESC");

            dt =
                (secondarySort)
                    ? SligoCS.Web.WI.WebSupportingClasses.WI.DataTableSorter.SecondarySortCompareSelectedFloatToTop(
                    dt, queryMarshaller, orderBy)
                    :SligoCS.Web.WI.WebSupportingClasses.WI.DataTableSorter.SortAndCompareSelectedFloatToTop(
                    dt, queryMarshaller, orderBy)
            ;
            // end sort

            String name;

            foreach (String col in GetDownloadRawVisibleColumns())
            {
                if (dt.Columns.Contains(col))
                {
                    if (GetDownloadRawColumnLabelMapping().ContainsKey(col))
                    {
                        name = GetDownloadRawColumnLabelMapping()[col];
                    }
                    else
                    {
                        name = col;
                    }

                    labels.Add("\"" + DownloadRawDataColumnHelper.NormalizeColumnName(name.Trim()) + "\"");
                }
            }
            data.Append(String.Join(",", labels.ToArray()) + "\r\n");

            foreach (DataRow row in dt.Rows)
            {
                Array         arrRow = row.ItemArray;
                List <String> strRow = new List <String>();
                //quote text:
                foreach (String col in GetDownloadRawVisibleColumns())
                {
                    if (dt.Columns.Contains(col))
                    {
                        strRow.Add("\"" + row[col].ToString().Trim() + "\"");
                    }
                }
                //delimit fields
                data.Append(String.Join(",", strRow.ToArray()) + "\r\n");
            }
            //throw new Exception(data.ToString());
            return(data.ToString());
        }
        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();
        }