예제 #1
0
        public String GetDisplayName(string ldapUsername)
        {
            //string key = "DisplayName" + "_" + ldapUsername;
            string displayName;// = (string)primitivesCache.GetData(key);

            //if (displayName == null)
            //{
                UserDA da = new UserDA();
                displayName = da.GetDisplayName(ldapUsername);

            //    primitivesCache.Add(key, displayName, CacheItemPriority.Normal, null,
            //         new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("LongCacheDuration")))));
            //}
            return displayName;
        }
예제 #2
0
        public DataTable GetCheckListForUID(int userId, int personId)
        {
            //string key = "userCheckList" + "_" + ViewerID + "_" + ProfileID;
            //DataTable checkList = (DataTable)primitivesCache.GetData(key);
            DataTable checkList;

            //if (checkList == null)
            //{
                UserDA da = new UserDA();
                checkList = da.GetCheckListForUID(userId, personId);

            //    primitivesCache.Add(key, checkList, CacheItemPriority.Normal, null,
            //         new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            //}

            return checkList;
        }
예제 #3
0
        private DataTable GetUserAdvisors(int userId, string relationShipType)
        {
            // string key = relationShipType + "_" + userId.ToString();
               DataTable ua = null ; //= (DataTable)primitivesCache.GetData(key);

            if (ua == null)
            {
                UserDA da = new UserDA();
                ua = da.GetUserAdvisors(userId, relationShipType);

              //  primitivesCache.Add(key, ua, CacheItemPriority.Normal, null,
               //      new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            }
            return ua;
        }
예제 #4
0
        private DataTable GetSpotlight(int personId, string spotlightType)
        {
            string key = spotlightType + "_" + personId.ToString();
            DataTable vt = (DataTable)primitivesCache.GetData(key);

            if (vt == null)
            {
                UserDA da = new UserDA();
                vt = da.GetSpotlight(personId, spotlightType);

                primitivesCache.Add(key, vt, CacheItemPriority.Normal, null,
                     new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            }
            return vt;
        }
예제 #5
0
        public DataTable GetUserSimilarPeople(int userId, string RowNum, ref int TotalCount)
        {
            string key = "userSimilarPeople" + "_" + userId.ToString();
            //DataTable dt = (DataTable)primitivesCache.GetData(key);
            DataTable dt = null;

            if (dt == null)
            {
                UserDA da = new UserDA();
                dt = da.GetUserSimilarPeople(userId, RowNum, ref TotalCount);

                // primitivesCache.Add(key, dt, CacheItemPriority.Normal, null,
                //     new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            }
            return dt;
        }
예제 #6
0
        public void SetUserPreferences(int userId, string Type, string Flag)
        {
            UserDA da = new UserDA();

            string key = "userPreferences" + "_" + userId.ToString();
            // Throw out any potential caching
            primitivesCache.Remove(key);

            da.SetUserPreferences(userId, Type, Flag);
        }
예제 #7
0
        public DataTable GetUserPublications(int userID)
        {
            // string key = "userPublications" + "_" + userID.ToString();
            DataTable pubs;// = (DataTable)primitivesCache.GetData(key);

            //if (pubs == null)
            //{
                UserDA da = new UserDA();
                pubs = da.GetUserPublications(userID);

            //    primitivesCache.Add(key, pubs, CacheItemPriority.Normal, null,
            //         new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            //}
            return pubs;
        }
예제 #8
0
        public DataTable GetUserSearchHistory(int userID)
        {
            // string key = "userSearchHistory" + "_" + userID.ToString();
            DataTable searchHistory;// = (DataTable)primitivesCache.GetData(key);
              UserDA da = new UserDA();
                searchHistory = da.GetUserSearchHistory(userID);

            //    primitivesCache.Add(key, searchHistory, CacheItemPriority.Normal, null,
            //         new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            //}

            return searchHistory;
        }
예제 #9
0
        public DataTable GetUserNetwork(int userId)
        {
            //string key = "userNetwork" + "_" + UID;
            //DataTable network = (DataTable)primitivesCache.GetData(key);
            DataTable network;

            //if (network == null)
            //{
                UserDA da = new UserDA();
                network = da.GetUserNetwork(userId);

            //    primitivesCache.Add(key, network, CacheItemPriority.Normal, null,
            //         new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            //}
            return network;
        }
예제 #10
0
        public UserPreferences GetUserPreferences(int userId)
        {
            //string key = "userPreferences" + "_" + userId.ToString();
            UserPreferences userPref;// = (UserPreferences)primitivesCache.GetData(key);

            //if (userPref == null)
               // {
                UserDA da = new UserDA();
                userPref = da.GetUserPreferences(userId);

              //  primitivesCache.Add(key, userPref, CacheItemPriority.Normal, null,
             //        new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            //}
            return userPref;
        }
예제 #11
0
        public DataTable GetUserNeighbors(int personID)
        {
            string key = "userNeighbors" + "_" + personID.ToString();
            DataTable neighbors;// = (DataTable)primitivesCache.GetData(key);

               // if (neighbors == null)
               // {
                UserDA da = new UserDA();
                neighbors = da.GetUserNeighbors(personID);

             //   primitivesCache.Add(key, neighbors, CacheItemPriority.Normal, null,
             //        new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
               // }
            return neighbors;
        }
예제 #12
0
        public DataTable GetUserMESHkeywords(int personID, string RowNum, ref int TotalCount)
        {
            string key = "userMeshKeywords" + "_" + personID.ToString();
            //DataTable mkw = (DataTable)primitivesCache.GetData(key);
            DataTable mkw=null;

            if (mkw == null)
            {
                UserDA da = new UserDA();
                mkw = da.GetUserMESHkeywords(personID, RowNum, ref TotalCount);

                //primitivesCache.Add(key, mkw, CacheItemPriority.Normal, null,
                 //    new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            }
            return mkw;
        }
예제 #13
0
        public DataTable GetUserMESHCategories(int personID,ref int TotalCount)
        {
            string key = "userMeshKeywords" + "_" + personID.ToString();
            //DataTable mkw = (DataTable)primitivesCache.GetData(key);
            DataTable mkw = null;

            if (mkw == null)
            {
                UserDA da = new UserDA();
                mkw = da.GetUserMESHCategories(personID, ref TotalCount);

            }
            return mkw;
        }
예제 #14
0
        public DataTable GetPersonAffiliations(int personID)
        {
            //string key = "personAffiliation" + "_" + personID.ToString();
            DataTable userInfo;// = (DataTable)primitivesCache.GetData(key);

            //if (userInfo == null)
            //{
                UserDA da = new UserDA();
                userInfo = da.GetPersonAffiliations(personID);

            //    primitivesCache.Add(key, userInfo, CacheItemPriority.Normal, null,
            //         new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            //}
            return userInfo;
        }
예제 #15
0
        public string GetMyProxies(int proxy)
        {
            //string key = "MyProxies" + "_" + proxy.ToString();
            string myProxies = string.Empty;

            //if (myProxies == null)
            //{
                myProxies = new UserDA().GetMyProxies(proxy);

            //    primitivesCache.Add(key, myProxies, CacheItemPriority.Normal, null,
            //         new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("SpotlightCacheDuration")))));
            //}

            return myProxies;
        }