示例#1
0
        public List <HomeInfo> HomeInfo_GetByLevel(string Level, int LevelLength)
        {
            List <DataAccess.HomeInfo> list = new List <DataAccess.HomeInfo>();

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

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.HomeInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
示例#2
0
        public List <HomeInfo> HomeInfo_GetByAll()
        {
            List <DataAccess.HomeInfo> list = new List <DataAccess.HomeInfo>();

            DataAccess.HomeInfo obj = new DataAccess.HomeInfo();
            DbCommand           cmd = db.GetStoredProcCommand("Home_SelectAll");

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.HomeInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
示例#3
0
        public List <HomeInfo> HomeInfo_Paging(string CurentHomeInfo, string HomeInfoSize)
        {
            List <DataAccess.HomeInfo> list = new List <DataAccess.HomeInfo>();

            DataAccess.HomeInfo obj = new DataAccess.HomeInfo();
            DbCommand           cmd = db.GetStoredProcCommand("Home_SelectPage", CurentHomeInfo, HomeInfoSize);

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