예제 #1
0
        public List <CityInfo> CityInfo_GetByAll()
        {
            List <DataAccess.CityInfo> list = new List <DataAccess.CityInfo>();

            DataAccess.CityInfo obj = new DataAccess.CityInfo();
            DbCommand           cmd = db.GetStoredProcCommand("City_SelectAll");

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CityInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
예제 #2
0
        public List <CityInfo> CityInfo_Paging(string CurentCityInfo, string CityInfoSize)
        {
            List <DataAccess.CityInfo> list = new List <DataAccess.CityInfo>();

            DataAccess.CityInfo obj = new DataAccess.CityInfo();
            DbCommand           cmd = db.GetStoredProcCommand("City_SelectPage", CurentCityInfo, CityInfoSize);

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CityInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
예제 #3
0
        public List <CityInfo> CityInfo_GetByLevel(string Level, int LevelLength)
        {
            List <DataAccess.CityInfo> list = new List <DataAccess.CityInfo>();

            DataAccess.CityInfo obj = new DataAccess.CityInfo();
            DbCommand           cmd = db.GetStoredProcCommand("sp_CityInfo_GetByLevel", Level, LevelLength);

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CityInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }