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);
            }
        }
        protected void Load_Display(string s_type, string alpha_fl, string f_key, string var_hs)
        {
            switch (s_type)
            {
            case "SC":
                ((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, false);
                ((SligoCS.Web.WI.WI)Page.Master).set_visible_state(WI.displayed_obj.DistrictInfo1, true);
                ((SligoCS.Web.WI.WI)Page.Master).set_visible_state(WI.displayed_obj.WI_DPI_Disclaim1, true);

                if ((alpha_fl != string.Empty) && (f_key == FullKeyUtils.StateFullKey(GlobalValues.FULLKEY)))
                // if (alpha_fl != string.Empty)
                {
                    QueryMarshaller.Database     = new SligoCS.DAL.WI.DALAgencies();
                    QueryMarshaller.Database.SQL = SligoCS.DAL.WI.DALALLAgencies.GetSchoolsByStartNameSQL(alpha_fl);
                    QueryMarshaller.ManualQuery();
                    GlobalValues.SQL = GlobalValues.SQL + "//" + QueryMarshaller.Database.SQL;

                    SligoDataGrid1.DataSource = QueryMarshaller.Database.DataSet;
                    SligoDataGrid1.DataBind();
                    SligoDataGrid1.AddSuperHeader("Searching in SCHOOL by Letter " + alpha_fl);
                    SligoDataGrid1.Visible = true;
                    No_Records_Found("No Schools Found Starting with ", alpha_fl);
                }
                else
                {
                    QueryMarshaller.Database     = new SligoCS.DAL.WI.DALAgencies();
                    QueryMarshaller.Database.SQL = SligoCS.DAL.WI.DALALLAgencies.GetSchoolByDistrictKeySQL(f_key);
                    QueryMarshaller.ManualQuery();
                    GlobalValues.SQL          = GlobalValues.SQL + " //" + QueryMarshaller.Database.SQL;
                    SligoDataGrid4.DataSource = QueryMarshaller.Database.DataSet;
                    SligoDataGrid4.DataBind();
                    try
                    {
                        SligoDataGrid4.AddSuperHeader("Searching Schools in DISTRICT, " + QueryMarshaller.Database.DataSet.Tables[0].Rows[0][SligoCS.DAL.WI.v_AgencyFull.DistrictName].ToString());
                    }
                    catch
                    {
                    }
                    SligoDataGrid4.Visible = true;
                }
                break;

            case "DI":
                GlobalValues.SQL = DALALLAgencies.GetDistrictByNameSQL(alpha_fl);
                QueryMarshaller.AssignQuery(new DALAgencies(), GlobalValues.SQL);
                SligoDataGrid2.DataSource = QueryMarshaller.Database.DataSet;
                SligoDataGrid2.DataBind();
                SligoDataGrid2.AddSuperHeader("Searching in DISTRICT by Letter " + alpha_fl);

                SligoDataGrid2.Visible = true;
                No_Records_Found("No Districts Found Starting with ", alpha_fl);
                break;

            case "CO":
                GlobalValues.SQL = DALALLAgencies.GetCountyByNameSQL(alpha_fl);
                QueryMarshaller.AssignQuery(new DALAgencies(), GlobalValues.SQL);
                SligoDataGrid3.DataSource = QueryMarshaller.Database.DataSet;
                SligoDataGrid3.DataBind();
                SligoDataGrid3.AddSuperHeader("Searching in COUNTY by Letter " + alpha_fl);
                SligoDataGrid3.Visible = true;
                No_Records_Found("No Counties Found Starting with ", alpha_fl);
                break;

            case "CE":
                if (alpha_fl.Length == 1)
                {
                    string pad = "0";
                    alpha_fl = pad + alpha_fl;
                }
                CESA_maps(alpha_fl, var_hs);

                GlobalValues.SQL = DALALLAgencies.GetDistrictByCESASQL(alpha_fl, var_hs);
                QueryMarshaller.AssignQuery(new DALAgencies(), GlobalValues.SQL);
                SligoDataGrid5.DataSource = QueryMarshaller.Database.DataSet;
                SligoDataGrid5.DataBind();

                SligoDataGrid5.AddSuperHeader("Results for CESA " + alpha_fl);

                if ((var_hs == "1") || (var_hs == "0"))
                {
                    if (var_hs == "1")
                    {
                        SligoDataGrid5.AddSuperHeader(SligoDataGrid5.SuperHeaderText + " with Union High School Districts");
                    }
                    else
                    {
                        SligoDataGrid5.AddSuperHeader(SligoDataGrid5.SuperHeaderText + " with Elementary School Districts");
                    }
                }

                SligoDataGrid5.Visible = true;
                break;
            }
        }