Ejemplo n.º 1
0
        /// <summary>
        /// 获取用户具有的权限
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public DataTable GetRoleTable(string userid)
        {
            string cacheStrphold = string.Format("CommonSearch_GetRoleTable_{0}", userid);

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

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