public BannerInfo GetLastBanner() { BannerInfo info = new BannerInfo(); IDataReader reader = db.GetDataByDesc().CreateDataReader(); reader.Read(); info = BannerInfo.Populate(reader); return(info); }
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); }
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); }
public BannerInfo GetDataById(int id) { BannerInfo info = new BannerInfo(); IDataReader reader = db.GetDataById(id).CreateDataReader(); if (reader.Read()) { info = BannerInfo.Populate(reader); } return(info); }
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); }