Beispiel #1
0
        //private static double GetExpire()
        //{
        //    return Constants.CacheExpire;
        //}
        public static DataSet GetAvailables(string positionId, int paramId, string channel)
        {
            //DataCaching dataCaching = new DataCaching();
            //string _cacheKey = "Advertise.GetAvailables";
            //string _param = _positionID.ToString() + "_" + _paramID.ToString() + "Lang=" + AppEnv.GetLanguage();
            //DataTable _retVal = (DataTable) dataCaching.GetHashCache(_cacheKey,_param);
            //if (_retVal == null)
            //{
            //    _retVal = AdvertiseDB.GetAvailables(_positionID,_paramID);
            //    dataCaching.SetHashCache(_cacheKey,_param,GetExpire(),_retVal);
            //}
            //return _retVal;

            DataSet retVal = AdvertiseDB.GetAvailables(positionId, paramId, channel);

            return(retVal);
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string position = "network";

            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var positionid = ConvertUtility.ToInt32(PositionDB.GetIDByPosition(position));

            var source = AdvertiseDB.GetAvailables(positionid, _zonecurrent); //AdvertiseDB.GetLimitedAvailables(positionid, zonecurrent, 8);

            if (source.Rows.Count <= 0)
            {
                return;
            }

            rptData.DataSource = source;
            rptData.DataBind();
        }