コード例 #1
0
        /// <summary>
        /// 获取用户所具有的平台列表
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public DataTable GetPlatformTableByUserid(string userid)
        {
            string cacheStrphold = string.Format("CommonSearch_GetPlatformTableByUserid_{0}", userid);

            if ((WebCache.GetCache(cacheStrphold) == null))
            {
                lock (lockHelp)
                {
                    if ((WebCache.GetCache(cacheStrphold) == null))
                    {
                        DataTable dt = commonSearch.GetPlatformTableByUserid(userid);

                        WebCache.SetCache(cacheStrphold, dt, 60);
                    }
                }
            }
            return((DataTable)WebCache.GetCache(cacheStrphold));
        }