Esempio n. 1
0
        public v_AgencyFull_2006 GetDistrictByCESA(string cesa_number, string var_hs)
        {
            StringBuilder sql = new StringBuilder();

            /*
             * sql.AppendFormat("SELECT fullkey, DistrictName, CountyName, LowGrade, HighGrade, AgencyType FROM v_AgencyFull_2006 WHERE SchoolName IS NULL AND DistrictName IS NOT NULL AND CountyName IS NOT NULL AND Year = 2006 AND CESA = '{0}'", cesa_number);
             */
            sql.AppendFormat("SELECT distinct left(fullkey,8)+'ZZZZ' fullkey, DistrictName, CountyName, LowGrade, HighGrade, AgencyType, SchoolType FROM v_AgencyFull_2006  WHERE Year = 2006 AND AgencyType in ('03','49') AND CESA = '{0}'", cesa_number);
            if ((var_hs == "1") || (var_hs == "0"))
            {
                if (var_hs == "1")
                {
                    sql.AppendFormat(" AND (UHSIndic = 'UHS' OR UHSIndic is Null)");
                }
                else
                {
                    sql.AppendFormat(" AND (UHSIndic = 'ELEM' OR UHSIndic is Null)");
                }
            }
            sql.AppendFormat(" Order By {0}", "DistrictName");
            v_AgencyFull_2006 ds = new v_AgencyFull_2006();

            base.GetDS(ds, sql.ToString(), ds._v_AgencyFull_2006.TableName);
            return(ds);
        }
Esempio n. 2
0
        public v_AgencyFull_2006 GetCountyBySubstr(string county_substr)
        {
            DALAgencyFull_2006 county = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds     = county.GetCountyBySubstr(county_substr);

            this.sql = county.SQL;
            return(ds);
        }
Esempio n. 3
0
        public v_AgencyFull_2006 GetDistrictBySubstr(string district_substr)
        {
            DALAgencyFull_2006 district = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds       = district.GetDistrictBySubstr(district_substr);

            this.sql = district.SQL;
            return(ds);
        }
Esempio n. 4
0
        public v_AgencyFull_2006 GetSchoolBySubstr(string school_substr)
        {
            DALAgencyFull_2006 school = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds     = school.GetSchoolBySubstr(school_substr);

            this.sql = school.SQL;
            return(ds);
        }
Esempio n. 5
0
        public v_AgencyFull_2006 GetCountyByName(string name_first_alpha)
        {
            DALAgencyFull_2006 county = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds     = county.GetCountyByName(name_first_alpha);

            this.sql = county.SQL;
            return(ds);
        }
Esempio n. 6
0
        public v_AgencyFull_2006 GetDistrictByCESA(string cesa_number, string var_hs)
        {
            DALAgencyFull_2006 district = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds       = district.GetDistrictByCESA(cesa_number, var_hs);

            this.sql = district.SQL;
            return(ds);
        }
Esempio n. 7
0
        public v_AgencyFull_2006 GetDistrictByName(string name_first_alpha)
        {
            DALAgencyFull_2006 district = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds       = district.GetDistrictByName(name_first_alpha);

            this.sql = district.SQL;
            return(ds);
        }
Esempio n. 8
0
        public v_AgencyFull_2006 GetSchoolByDistrictKey(string District_Key)
        {
            DALAgencyFull_2006 school = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds     = school.GetSchoolByDistrictKey(District_Key);

            this.sql = school.SQL;
            return(ds);
        }
Esempio n. 9
0
        public v_AgencyFull_2006 GetSchoolByName(string name_first_alpha)
        {
            DALAgencyFull_2006 school = new DALAgencyFull_2006();
            v_AgencyFull_2006  ds     = school.GetSchoolByName(name_first_alpha);

            this.sql = school.SQL;
            return(ds);
        }
Esempio n. 10
0
        public v_AgencyFull_2006 GetSchool(string fullKey, int year)
        {
            DALAgencyFull_2006 school = new DALAgencyFull_2006();
            // string masked = GetMaskedFullkey(fullKey, OrgLevel.School);
            // v_AgencyFull_2006 ds = school.GetSchool(masked, year);
            v_AgencyFull_2006 ds = school.GetSchool(fullKey, year);

            this.sql = school.SQL;
            return(ds);
        }
Esempio n. 11
0
        public v_AgencyFull_2006 GetSchool(string fullKey, int year)
        {
            StringBuilder sql = new StringBuilder();

            sql.AppendFormat("SELECT fullkey, DistrictName, CountyName, SchoolName, LowGrade, HighGrade, SchoolType, AgencyType FROM v_AgencyFull_2006 WHERE fullkey like '{0}%'", fullKey);
            sql.AppendFormat(" AND year = {0}", year);
            v_AgencyFull_2006 ds = new v_AgencyFull_2006();

            base.GetDS(ds, sql.ToString(), ds._v_AgencyFull_2006.TableName);
            return(ds);
        }
Esempio n. 12
0
        public v_AgencyFull_2006 GetDistrictBySubstr(string district_substr)
        {
            StringBuilder sql = new StringBuilder();

            sql.AppendFormat("SELECT distinct left(fullkey,8)+'ZZZZ' fullkey, DistrictName, CountyName, Schoolname, LowGrade, HighGrade, AgencyType, SchoolType FROM v_AgencyFull_2006 WHERE AgencyType = '03' AND Year = 2006 AND DistrictName LIKE '%{0}%' Order By DistrictName", district_substr);
            /* sql.AppendFormat("SELECT fullkey, DistrictName, CountyName, Schoolname, LowGrade, HighGrade, AgencyType FROM v_AgencyFull_2006 WHERE CountyName IS NOT NULL AND DistrictName IS NOT NULL AND SchoolName IS NULL AND Year = 2006 AND DistrictName LIKE '%{0}%' Order By DistrictName", district_substr); */
            // sql.AppendFormat(" Order By {0}", "DistrictName");
            v_AgencyFull_2006 ds = new v_AgencyFull_2006();

            base.GetDS(ds, sql.ToString(), ds._v_AgencyFull_2006.TableName);
            return(ds);
        }
Esempio n. 13
0
        public v_AgencyFull_2006 GetSchoolByDistrictKey(string District_Key)
        {
            string District_Key_temp = string.Concat(District_Key.Substring(0, 6), "04");
            //string District_Key_temp = "07329004";

            StringBuilder sql = new StringBuilder();

            sql.AppendFormat("SELECT fullkey, DistrictName, CountyName, Schoolname, LowGrade, HighGrade, AgencyType, SchoolType FROM v_AgencyFull_2006 WHERE fullkey LIKE '{0}%' Order By SchoolName, DistrictName", District_Key_temp);
            // sql.AppendFormat(" Order By {0}", "SchoolName, DistrictName");
            v_AgencyFull_2006 ds = new v_AgencyFull_2006();

            base.GetDS(ds, sql.ToString(), ds._v_AgencyFull_2006.TableName);
            return(ds);
        }
Esempio n. 14
0
        public v_AgencyFull_2006 GetCountyByName(string name_first_alpha)
        {
            StringBuilder sql = new StringBuilder();

            sql.AppendFormat("SELECT fullkey, DistrictName, CountyName, Schoolname, LowGrade, HighGrade, AgencyType, SchoolType FROM v_AgencyFull_2006 WHERE AgencyType = '03' AND Year = 2006 AND CountyName LIKE '{0}%' Order By CountyName, DistrictName", name_first_alpha);

            /*
             * sql.AppendFormat("SELECT fullkey, DistrictName, CountyName, Schoolname, LowGrade, HighGrade, AgencyType FROM v_AgencyFull_2006 WHERE SchoolName IS NULL AND DistrictName IS NOT NULL AND CountyName IS NOT NULL AND Year = 2006 AND CountyName LIKE '{0}%' Order By CountyName, DistrictName", name_first_alpha);
             */
            // sql.AppendFormat(" Order By {0}", "CountyName, DistrictName");
            v_AgencyFull_2006 ds = new v_AgencyFull_2006();

            base.GetDS(ds, sql.ToString(), ds._v_AgencyFull_2006.TableName);
            return(ds);
        }