Example #1
0
        public override String BuildSQL(QueryMarshaller Marshaller)
        {
            StringBuilder sql      = new StringBuilder();
            String        dbObject = "v_TruancySchoolDistState";

            sql.Append(Marshaller.SelectListFromVisibleColumns(dbObject));

            sql.Append(Marshaller.STYPClause(SQLHelper.WhereClauseJoiner.NONE, "SchoolType", dbObject));

            ////Adds " ... AND (SexCode in (1, 2)) ..."
            sql.Append(SQLHelper.WhereClauseValuesInList(SQLHelper.WhereClauseJoiner.AND, "SexCode", Marshaller.sexCodes));

            //Adds " ... AND (RaceCode in (1, 2, 3, 4, 5)) ..."
            sql.Append(SQLHelper.WhereClauseValuesInList(SQLHelper.WhereClauseJoiner.AND, "RaceCode", Marshaller.raceCodes));

            sql.Append(Marshaller.GradeCodesClause(SQLHelper.WhereClauseJoiner.AND, "GradeCode", dbObject));

            //Adds " ... AND ((year >= 1997) AND (year <= 2007)) ..."
            sql.Append(SQLHelper.WhereClauseSingleValueOrInclusiveRange(SQLHelper.WhereClauseJoiner.AND, "year", Marshaller.years));

            sql.Append(Marshaller.FullkeyClause(SQLHelper.WhereClauseJoiner.AND, "FullKey"));

            sql.AppendFormat(SQLHelper.GetOrderByClause(Marshaller.orderByList));

            return(sql.ToString());
        }
Example #2
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();
        }
        protected void btnSchool_Click(object sender, EventArgs e)
        {
            string school_substr = string.Empty;

            QueryMarshaller.Database = new SligoCS.DAL.WI.DALAgencies();

            if (this.txtSchoolName.Text != string.Empty)
            {
                school_substr = this.txtSchoolName.Text;

                pnl_sdc.Visible = false;
                pnl_CESA_Map_Control.Visible = false;
                SligoSchoolGrid.Visible      = true;

                ((SligoCS.Web.WI.WI)Page.Master).set_visible_state(WI.displayed_obj.InitSelSchoolInfo1, false);
                ((SligoCS.Web.WI.WI)Page.Master).set_visible_state(WI.displayed_obj.DistrictMapInfo1, true);
                ((SligoCS.Web.WI.WI)Page.Master).set_visible_state(WI.displayed_obj.DistrictInfo1, false);
                ((SligoCS.Web.WI.WI)Page.Master).set_visible_state(WI.displayed_obj.WI_DPI_Disclaim1, true);

                QueryMarshaller.Database.SQL = SligoCS.DAL.WI.DALALLAgencies.GetSchoolBySubstrSQL(school_substr);
                QueryMarshaller.ManualQuery();
                _ds = QueryMarshaller.Database.DataSet;
                GlobalValues.SQL = GlobalValues.SQL + " //" + QueryMarshaller.Database.SQL;

                SligoSchoolGrid.DataSource = _ds;
                SligoSchoolGrid.DataBind();
                SligoSchoolGrid.AddSuperHeader("Searching in SCHOOL for <i>" + school_substr + "</i>");
                No_Records_Found("No Schools Found like ", school_substr);
            }
        }
        String GetCustomOrderBy(List <String> order, DataColumnCollection columns)
        {
            QueryMarshaller.BuildCompareToOrderBy(order, columns);

            if (GlobalValues.Group.Key != GroupKeys.All
                &&
                (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools)
                )
            {
                order.Insert(0, v_WSAS.District_Name);//district, school
            }

            if (GlobalValues.Grade.Key == GradeKeys.AllDisAgg)
            {
                order.Add(v_WSAS.GradeCode + " ASC");
            }

            if (GlobalValues.SubjectID.Key == SubjectIDKeys.AllTested)
            {
                order.Add(v_WSAS.SubjectID);
            }

            if (GlobalValues.Group.Key != GroupKeys.All)
            {
                QueryMarshaller.BuildOrderByViewByGroup(order, columns);
            }

            return(String.Join(",", order.ToArray()));
        }
        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();
        }
        protected override void OnInit(EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Entered PageBaseWI.OnInit");

            OnCheckPrerequisites += CheckSelectedSchoolOrDistrict;
            OnRedirectUser       += decommissionedPagesRedirect;

            userValues        = new GlobalValues();
            globalValues      = new GlobalValues();
            globalValues.Page = this;

            //Warning: dependencies between rules dictate order in which they are called
            InitComplete += GlobalValues.OverrideCompareToWhenOrgLevelIsState;
            InitComplete += GlobalValues.OverrideSchoolTypeWhenGroupIsGrade;
            InitComplete += GlobalValues.OverrideSchoolTypeWhenOrgLevelIsSchool;
            InitComplete += GlobalValues.OverrideGroupWhenSchoolTypeIsAll;
            InitComplete += GlobalValues.OverrideLowGradeHighGradeForPriorYears;

            queryMarshaller = new QueryMarshaller(globalValues);
            titleBuilder    = new TitleBuilder(globalValues);

            base.OnInit(e);

            //ineligant handling of inelegant extension of CompareTo that is really just the Similar Schools page:
            if (GlobalValues.CompareTo.Key == CompareToKeys.SimSchools &&
                System.IO.Path.GetFileName(Request.Path) != GraphFileKeys.StateTestsSimilar)
            {
                GlobalValues.CompareTo.Key = CompareToKeys.Years;
            }
        }
        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();
        }
Example #8
0
        private void populateDropdownlists()
        {
            QueryMarshaller qm = QueryMarshaller;

            string selectedCounty        = GlobalValues.Agency.County;
            string selectedConferenceKey = GlobalValues.Agency.ConferenceKey;
            string selectedCESA          = GlobalValues.Agency.CESA;

            populateCountyDropdown(qm);
            populateAthleticConfDropdown(qm);
            populateCESADropdown(qm);

            if (string.IsNullOrEmpty(selectedCounty) == false)
            {
                CountyDropdownlist.SelectedValue = selectedCounty;
            }

            if (string.IsNullOrEmpty(selectedConferenceKey) == false)
            {
                AthleticConferenceDropdownlist.SelectedValue = selectedConferenceKey;
            }

            if (string.IsNullOrEmpty(selectedCESA) == false)
            {
                CESADropdownlist.SelectedValue = selectedCESA;
            }
        }
        /// <summary>
        /// Encapsulates retrieving paramName Strings for County, Athletic Conf and CESA.
        /// </summary>
        /// <returns></returns>
        public static String GetRegionString(GlobalValues GlobalValues)
        {
            string result = string.Empty;

            if (GlobalValues.SRegion.Key == SRegionKeys.County &&
                !string.IsNullOrEmpty(GlobalValues.SCounty))
            {
                QueryMarshaller qm = GlobalValues.Page.QueryMarshaller;
                qm.Database = new DALALLAgencies();
                result      = ((DALALLAgencies)qm.Database).GetCountyNameByID(GlobalValues.SCounty.Trim());
            }
            else if (GlobalValues.SRegion.Key == SRegionKeys.AthleticConf &&
                     !string.IsNullOrEmpty(GlobalValues.SAthleticConf))
            {
                QueryMarshaller qm = GlobalValues.Page.QueryMarshaller;
                qm.Database = new DALAthleticConf();
                result      = ((DALAthleticConf)qm.Database).GetAthleticConfNameByID(int.Parse(GlobalValues.SAthleticConf)) + " Athletic Conference";
            }
            else if (GlobalValues.SRegion.Key == SRegionKeys.CESA &&
                     !string.IsNullOrEmpty(GlobalValues.SCESA))
            {
                result = (new DALALLAgencies()).GetCESANameByID(
                    (GlobalValues.SCESA).Trim());
            }
            else if (GlobalValues.SRegion.Key == SRegionKeys.Statewide)
            {
                result = " the State";
            }

            return(result);
        }
        public override string BuildSQL(QueryMarshaller Marshaller)
        {
            StringBuilder sql = new StringBuilder();
            String        dbObject;

            if (Marshaller.GlobalValues.Group.Key == SligoCS.Web.WI.WebSupportingClasses.WI.GroupKeys.EngLangProf)
            {
                dbObject = "v_LEPSchoolDistState ";
            }
            else if (Marshaller.GlobalValues.Group.Key == SligoCS.Web.WI.WebSupportingClasses.WI.GroupKeys.EconDisadv)
            {
                dbObject = "v_ErateRollups ";
            }
            else
            {
                dbObject = "v_Template_Keys_WWoDisEconELP_tblAgencyFull_Flat ";
            }

            sql.Append(Marshaller.SelectListFromVisibleColumns(dbObject));

            //School Types
            sql.Append(Marshaller.STYPClause(SQLHelper.WhereClauseJoiner.NONE, "SchoolType", dbObject));

            //years
            sql.Append(SQLHelper.WhereClauseSingleValueOrInclusiveRange(SQLHelper.WhereClauseJoiner.AND, "year", Marshaller.years));

            sql.Append(Marshaller.FullkeyClause(SQLHelper.WhereClauseJoiner.AND, "FullKey"));

            //order by clause
            sql.AppendFormat(SQLHelper.GetOrderByClause(Marshaller.orderByList));

            return(sql.ToString());
        }
Example #11
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();
        }
Example #12
0
        private DataTable SortDataSource(DataTable source)
        {
            QueryMarshaller qm    = ((PageBaseWI)Page).QueryMarshaller;
            DataTable       table = null;

            //keep source and table sorted the same way before transformed below.
            if (String.IsNullOrEmpty(OrderBy))
            {
                table = SligoCS.Web.WI.WebSupportingClasses.WI.DataTableSorter.SortAndCompareSelectedFloatToTop(
                    source, qm);
            }
            else
            {
                table =
                    SligoCS.Web.WI.WebSupportingClasses.WI.DataTableSorter.SortAndCompareSelectedFloatToTop(
                        source, qm, OrderBy);
            }

            if ((((PageBaseWI)Page).GlobalValues.TraceLevels & TraceStateUtils.TraceLevels.graph) == TraceStateUtils.TraceLevels.graph)
            {
                //TraceStateUtils.DumpTableToResponse(table, Page.Response, "DataTable Post-Sort");
            }

            return(table);
        }
        private void populateAvailableSchoolsGrid(String selectedAndCurrentCSV)
        {
            NoAppropriateLabel.Text = String.Format(
                "No appropriate {0} of this type in this location.",
                (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools) ? "Schools" : "Districts"
                );

            if (!String.IsNullOrEmpty(selectedAndCurrentCSV))
            {
                GlobalValues.SQL = getAvailableQuery(selectedAndCurrentCSV);
                if (!String.IsNullOrEmpty(GlobalValues.SQL))
                {
                    //throw new Exception(GlobalValues.SQL);
                    QueryMarshaller.AssignQuery(new DALAgencies(), GlobalValues.SQL);
                    _ds = QueryMarshaller.Database.DataSet.Copy();
                }
            }
            if (_ds != null && _ds.Tables[0].Rows.Count > 0)
            {
                gvAvailable.DataSource = DataTableSorter.SortTable(_ds.Tables[0], "DistrictName, SchoolName");
                gvAvailable.DataBind();
                gvAvailable.ShowHeader = false;
            }
            else
            {
                NoAppropriateMessage.Visible = true;
                gvAvailable.Visible          = false;
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="prefix"></param>
        /// <param name="globals"></param>
        /// <param name="qm"></param>
        /// <returns></returns>
        public String GetTitleWithoutGroup(String prefix, GlobalValues globals, QueryMarshaller qm)
        {
            //capture prefix in Public Property
            Prefix = prefix;

            return
                (GetTitleBase(prefix, globals, qm) + newline
                 + GetSchoolTypeInTitle(globals.STYP));
        }
        /// <summary>
        /// Extends GetTitle with addition of SchoolType
        /// </summary>
        /// <param name="prefix"></param>
        /// <param name="globals"></param>
        /// <param name="qm"></param>
        /// <returns></returns>
        public String GetTitle(String prefix, GlobalValues globals, QueryMarshaller qm)
        {
            #region requirements
            //[Cut and paste from Design Guide]
            //GRAPH AND TABLE TITLES
            //Titles should contain enough information so that if user has only the table or
            //only the graph they will know the options the user selected.  Otherwise users
            //will be confused and make assumptions about the data which are not accurate.

            //General Idea
            //Here is how I'd expect most titles to appear.
            //<TYPE OF DATA -- e.g. Dropout Rate> <VIEW BY OPTION-- e.g. by Gender> <OTHER
            //OPTION?>
            //<SCHOOL NAME - e.g. Cherokee Elem> or <DISTRICT NAME - e.g. Madison District>
            //or <Entire State>
            //<YEAR OF DATA> Compared to Prior Years
            //<YEAR OF DATA -- e.g. 2002-03> Compared to Selected  Schools
            //<YEAR OF DATA -- e.g. 2002-03> Compared to All <SCHOOL TYPE - e.g. Elem>
            //Schools in <LOCATION -- e.g. CESA 2>>
            //<YEAR OF DATA> Compared to District/State  <SCHOOL TYPE - e.g. Elem Schools>
            //<YEAR OF DATA> Compared to State  <SCHOOL TYPE - e.g. Elem Schools>
            //<SCHOOL TYPE> (This line needed for District and State Views if Compare To
            //Prior Years, Selected Districts, or Current Data Only are selected.  Can appear
            //next to the district name above or here below. )
            //If Compare to Current Data Only is picked then need the <YEAR OF DATA> on
            //another line.

            //    //Example 1  -  What are the qualifications of teachers?

            //    //Here are the options selected:
            //    //School Type:  Elem
            //    //Show: Wisconsin License Status
            //    //Subject Taught:  All Subjects Combined
            //    //Compare To: Prior Years

            //    //Here is the resulting title.
            //    //Teacher Qualifications - Wisconsin License Status
            //    //All Subjects Combined
            //    //District paramName  - Elem Schools
            //    //2005-06 Compared to Prior Years

            //    //Bottom line is that graph and table titles should completely describe the
            //    //options selected.  sometimes I think we have left off the school type and the
            //    //compare to options when this information is important for understanding the
            //    //data in the graph or table.
            #endregion

            //capture prefix in Public Property
            Prefix = prefix;

            return  //fyi: SchoolType Label also appears in GetCompareToInTitle() logic
                   (GetTitleWithoutGroup(
                        prefix + GetViewByInTitle(globals.Group), globals, qm
                        )
                   );
        }
Example #16
0
        private void populateCountyDropdown(QueryMarshaller qm)
        {
            GlobalValues.SQL = DALAgencies.GetCountyListSQL();
            qm.AssignQuery(new DALAgencies(), GlobalValues.SQL);

            CountyDropdownlist.DataSource     = qm.Database.DataSet;
            CountyDropdownlist.DataValueField = v_AgencyFull.County;
            CountyDropdownlist.DataTextField  = v_AgencyFull.CountyName;
            CountyDropdownlist.DataBind();
        }
Example #17
0
        private void populateAthleticConfDropdown(QueryMarshaller qm)
        {
            qm.AutoQuery(new DALAthleticConf());
            //trace:
            GlobalValues.SQL = qm.Database.SQL;

            AthleticConferenceDropdownlist.DataSource     = qm.Database.DataSet;
            AthleticConferenceDropdownlist.DataValueField = v_Athletic_Conf.ConferenceKey;
            AthleticConferenceDropdownlist.DataTextField  = v_Athletic_Conf.Name;
            AthleticConferenceDropdownlist.DataBind();
        }
Example #18
0
        private void populateCESADropdown(QueryMarshaller qm)
        {
            GlobalValues.SQL = DALAgencies.GetCESAListSQL();
            qm.AssignQuery(new DALAgencies(), GlobalValues.SQL);

            CESADropdownlist.DataSource           = qm.Database.DataSet;
            CESADropdownlist.DataValueField       = v_AgencyFull.CESA;
            CESADropdownlist.DataTextField        = v_AgencyFull.CESA;
            CESADropdownlist.DataTextFormatString = "Cooperative Ed Serv Agcy {0}";
            CESADropdownlist.DataBind();
        }
        private String GetTitleBase(String prefix, GlobalValues globals, QueryMarshaller qm)
        {
            String regionString = GetRegionString(globals);

            qm.InitLists();

            return(prefix + newline +
                   globals.GetOrgName() + newline +
                   GetYearRangeInTitle(qm.years) + " " +
                   GetCompareToInTitle(globals.OrgLevel,
                                       globals.CompareTo,
                                       globals.STYP,
                                       globals.S4orALL,
                                       regionString)
                   );
        }
Example #20
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);
        }
        public List <String> getGradeCodeRange()
        {
            List <String>   codes = new List <String>();
            QueryMarshaller qm    = new QueryMarshaller(GlobalValues);

            //if (GlobalValues.CompareTo.Key == CompareToKeys.Current
            //    && GlobalValues.Group.Key == GroupKeys.All
            //    && GlobalValues.SubjectID.Key != SubjectIDKeys.AllTested)
            codes.Add(GlobalValues.Grade.Range[GradeKeys.AllDisAgg]);

            GlobalValues.SQL = DALWSAS.WSASGrades(qm);
            qm.AssignQuery(new DALWSAS(), GlobalValues.SQL);
            DataSet result = qm.Database.DataSet.Copy();

            if (result == null || result.Tables[0].Rows.Count == 0)
            {
                return(codes);
            }

            foreach (DataRow row in result.Tables[0].Rows)
            {
                codes.Add(row[0].ToString());
            }

            //unsupported grade by Subject:
            string[] unsupported =
            {
                GlobalValues.Grade.Range[GradeKeys.Grade_3],
                GlobalValues.Grade.Range[GradeKeys.Grade_5],
                GlobalValues.Grade.Range[GradeKeys.Grade_6],
                GlobalValues.Grade.Range[GradeKeys.Grade_7]
            };
            if (GlobalValues.SubjectID.Key == SubjectIDKeys.Language ||
                GlobalValues.SubjectID.Key == SubjectIDKeys.Science ||
                GlobalValues.SubjectID.Key == SubjectIDKeys.SocialStudies)
            {
                foreach (String gr in unsupported)
                {
                    if (codes.Contains(gr))
                    {
                        codes.Remove(gr);
                    }
                }
            }
            //throw new Exception(String.Join(",", codes.ToArray()));
            return(codes);
        }
        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);
        }
Example #23
0
        protected void populateSelectedTable(List <String> selected)
        {
            if (selected.Count > 0)
            {
                GlobalValues.SQL =
                    (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools) ?
                    DALAgencies.GetSelectedSchoolsSQL(
                        SligoCS.BL.WI.Utilities.BLUtil.GetCommaDeliFullKeyString(String.Join("", selected.ToArray())))
                : DALAgencies.GetSelectedDistrictsSQL(
                        SligoCS.BL.WI.Utilities.BLUtil.GetCommaDeliFullKeyString(String.Join("", selected.ToArray())))
                ;
                QueryMarshaller.AssignQuery(new DALAgencies(), GlobalValues.SQL);
                DataSet _dsSelected = QueryMarshaller.Database.DataSet.Copy();

                if (_dsSelected == null || _dsSelected.Tables[0].Rows.Count <= 0)
                {
                    return;
                }

                int distName = _dsSelected.Tables[0].Columns["DistrictName"].Ordinal;
                int schlName = _dsSelected.Tables[0].Columns["SchoolName"].Ordinal;

                foreach (DataRow row in _dsSelected.Tables[0].Rows)
                {
                    TableRow  newRow  = new TableRow();
                    TableCell newCell = new TableCell();
                    newCell.ColumnSpan  = 2;
                    newCell.CssClass    = "smtext";
                    newCell.BorderStyle = BorderStyle.Double;
                    newCell.BorderWidth = 2;

                    if (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools)
                    {
                        newCell.Text = "<b>" + row.ItemArray[distName] + "/" + row.ItemArray[schlName] + "</b>";
                    }
                    if (GlobalValues.CompareTo.Key == CompareToKeys.SelDistricts)
                    {
                        newCell.Text = "<b>/" + row.ItemArray[distName] + "</b>";
                    }

                    newRow.Cells.Add(newCell);
                    SelectedListTable.Rows.Add(newRow);
                }
            }
        }
        private void populateSelectedGrid(String selectedCSV)
        {
            GlobalValues.SQL =
                (GlobalValues.CompareTo.Key == CompareToKeys.SelSchools) ?
                DALAgencies.GetSelectedSchoolsSQL(selectedCSV)
                : DALAgencies.GetSelectedDistrictsSQL(selectedCSV)
            ;
            QueryMarshaller.AssignQuery(new DALAgencies(), GlobalValues.SQL);
            _dsSelected = QueryMarshaller.Database.DataSet.Copy();

            if (_dsSelected != null && _dsSelected.Tables[0].Rows.Count > 0)
            {
                gvSelected.DataSource = DataTableSorter.SortTable(_dsSelected.Tables[0], "SchoolName, DistrictName");
                gvSelected.DataBind();
            }
            gvSelected.ShowHeader = false;
            PanelSelected.Visible = (gvSelected.Rows.Count > 0);
            PanelNoChosen.Visible = !PanelSelected.Visible;
        }
Example #25
0
        public List <String> getGradeCodeRange()
        {
            List <String>   codes = new List <String>();
            QueryMarshaller qm    = new QueryMarshaller(GlobalValues);

            GlobalValues.SQL = DALWSAS.WSASGrades(qm);
            qm.AssignQuery(new DALWSAS(), 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());
            }
            return(codes);
        }
        public void OverrideLowGradeHighGradeForPriorYears(Object sender, EventArgs e)
        {
            if (!(CompareTo.Key == CompareToKeys.Years && Group.Key == GroupKeys.Grade))
            {
                return;
            }

            DALLowGradeHighGradePY dal = new DALLowGradeHighGradePY();
            QueryMarshaller        qm  = new QueryMarshaller(this);

            System.Collections.Hashtable lowhi = dal.GetLowGradeHiGradePY(qm);
            if (lowhi == null)
            {
                return;
            }

            this.LOWGRADE  = int.Parse((string)lowhi["low"]);
            this.HIGHGRADE = int.Parse((string)lowhi["hi"]);

            SligoCS.BL.WI.QueryMarshaller.SetLowGradeFloors(this);
        }
Example #27
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);
        }
Example #28
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);
            }
        }
        /// <summary>
        /// Build a standard Data Set Title
        /// Will always display schooltype as Summary, for use on pages that don't suppot SchoolType
        /// </summary>
        /// <param name="prefix">Begining of the Title String, usually the major identifier of the data.</param>
        /// <param name="entity"></param>
        /// <param name="regionString"></param>
        /// <returns></returns>
        public String GetTitleForSchoolTypeUnsupported(
            string prefix,
            GlobalValues globals, QueryMarshaller qm)
        {
            String styp = String.Empty;

            //capture prefix in Public Property
            Prefix = prefix;

            if (!(globals.OrgLevel.Key == OrgLevelKeys.School &&
                  globals.CompareTo.Key == CompareToKeys.Years))
            {
                STYP summary = new STYP();
                summary.Value = globals.STYP.Range[STYPKeys.StateSummary];

                styp = newline + GetSchoolTypeInTitle(summary);
            }

            return
                (GetTitleBase(
                     prefix + GetViewByInTitle(globals.Group), globals, qm) + styp);
        }
Example #30
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();
        }