Beispiel #1
0
        /// <summary>
        /// 从IDataReader创建PVStatInfo
        /// </summary>
        public static PVStatInfo BuildPVStatFromReader(IDataReader reader)
        {
            PVStatInfo pvStatInfo = new PVStatInfo();

            pvStatInfo.Category = reader["category"].ToString();
            pvStatInfo.Value    = reader["value"].ToString();
            pvStatInfo.Count    = TypeHelper.ObjectToInt(reader["count"]);

            return(pvStatInfo);
        }
Beispiel #2
0
        /// <summary>
        /// 获得PV统计
        /// </summary>
        /// <param name="category">分类</param>
        /// <param name="value">值</param>
        /// <returns></returns>
        public static PVStatInfo GetPVStatByCategoryAndValue(string category, string value)
        {
            PVStatInfo  pvStatInfo = null;
            IDataReader reader     = BrnShop.Core.BSPData.RDBS.GetPVStatByCategoryAndValue(category, value);

            if (reader.Read())
            {
                pvStatInfo = BuildPVStatFromReader(reader);
            }

            reader.Close();
            return(pvStatInfo);
        }
Beispiel #3
0
        /// <summary>
        /// 获得PV统计列表
        /// </summary>
        /// <param name="condition">条件</param>
        /// <returns></returns>
        public static List <PVStatInfo> GetPVStatList(string condition)
        {
            List <PVStatInfo> pvStatList = new List <PVStatInfo>();
            IDataReader       reader     = BrnShop.Core.BSPData.RDBS.GetPVStatList(condition);

            while (reader.Read())
            {
                PVStatInfo pvStatInfo = BuildPVStatFromReader(reader);
                pvStatList.Add(pvStatInfo);
            }

            reader.Close();
            return(pvStatList);
        }