예제 #1
0
        public BannerInfo GetLastBanner()
        {
            BannerInfo  info   = new BannerInfo();
            IDataReader reader = db.GetDataByDesc().CreateDataReader();

            reader.Read();
            info = BannerInfo.Populate(reader);
            return(info);
        }
예제 #2
0
        public List <BannerInfo> GetDataByCustomer(int bcs_id)
        {
            List <BannerInfo> infos  = new List <BannerInfo>();
            IDataReader       reader = db.GetDataByCustomer(bcs_id).CreateDataReader();

            while (reader.Read())
            {
                infos.Add(BannerInfo.Populate(reader));
            }
            return(infos);
        }
예제 #3
0
        public List <BannerInfo> GetDataByLocation(int bl_id)
        {
            List <BannerInfo> infos  = new List <BannerInfo>();
            IDataReader       reader = db.GetDataByLocationOrderBcAndTitle(bl_id).CreateDataReader();

            while (reader.Read())
            {
                infos.Add(BannerInfo.Populate(reader));
            }
            return(infos);
        }
예제 #4
0
        public BannerInfo GetDataById(int id)
        {
            BannerInfo  info   = new BannerInfo();
            IDataReader reader = db.GetDataById(id).CreateDataReader();

            if (reader.Read())
            {
                info = BannerInfo.Populate(reader);
            }
            return(info);
        }
예제 #5
0
        public List <BannerInfo> getAll()
        {
            List <BannerInfo> infos  = new List <BannerInfo>();
            IDataReader       reader = db.GetData().CreateDataReader();

            while (reader.Read())
            {
                infos.Add(BannerInfo.Populate(reader));
            }
            return(infos);
        }