Esempio n. 1
0
        private void ChangePageSizeSetting(int portalId, int userId, int pageSize)
        {
            var personalizationController = new Services.Personalization.PersonalizationController();
            var personalization           = personalizationController.LoadProfile(userId, portalId);

            personalization.Profile["User-Accounts:" + "pageSize_" + portalId] = pageSize.ToString(CultureInfo.InvariantCulture);
            personalization.IsModified = true;
            personalizationController.SaveProfile(personalization);
        }
Esempio n. 2
0
        private int GetPageSizeSetting(int portalId, int userId)
        {
            var personalizationController = new Services.Personalization.PersonalizationController();
            var personalization           = personalizationController.LoadProfile(userId, portalId);
            var pageSizeValue             = personalization.Profile["User-Accounts:" + "pageSize_" + portalId];

            if (pageSizeValue == null)
            {
                return(Null.NullInteger);
            }
            return(Int32.Parse(pageSizeValue.ToString(), CultureInfo.InvariantCulture));
        }
Esempio n. 3
0
        private IEnumerable <KeyValuePair <string, PortalDesktopModuleInfo> > GetBookmarkedModules(int portalId, int userId)
        {
            var personalizationController = new Services.Personalization.PersonalizationController();
            var personalization           = personalizationController.LoadProfile(userId, portalId);
            var bookmarkItems             = personalization.Profile["ControlBar:" + BookmarkModulesTitle + portalId];

            if (bookmarkItems == null)
            {
                return(new List <KeyValuePair <string, PortalDesktopModuleInfo> >());
            }
            var bookmarkItemsKeys = bookmarkItems.ToString().Split(',').ToList();
            var bookmarkedModules = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId)
                                    .Where(dm => bookmarkItemsKeys.Contains(dm.Value.DesktopModuleID.ToString(CultureInfo.InvariantCulture)));

            return(bookmarkedModules);
        }
Esempio n. 4
0
 private int GetPageSizeSetting(int portalId, int userId)
 {
     var personalizationController = new Services.Personalization.PersonalizationController();
     var personalization = personalizationController.LoadProfile(userId, portalId);
     var pageSizeValue = personalization.Profile["User-Accounts:" + "pageSize_" + portalId];
     if (pageSizeValue == null)
     {
         return Null.NullInteger;
     }
     return Int32.Parse(pageSizeValue.ToString(), CultureInfo.InvariantCulture);
 }
Esempio n. 5
0
 private void ChangePageSizeSetting(int portalId, int userId, int pageSize)
 {
     var personalizationController = new Services.Personalization.PersonalizationController();
     var personalization = personalizationController.LoadProfile(userId, portalId);
     personalization.Profile["User-Accounts:" + "pageSize_" + portalId] = pageSize.ToString(CultureInfo.InvariantCulture);
     personalization.IsModified = true;
     personalizationController.SaveProfile(personalization);
 }