예제 #1
0
        private EpmChartUserSettings GetPersistedBubbleChartPersonalizations()
        {
            var web            = SPContext.Current.Web;
            var searchCriteria = new PersonalizationSearchCriteria
            {
                SiteId    = web.Site.ID,
                WebId     = web.ID,
                WebPartId = WebPartHelper.ConvertWebPartIdToGuid(ID),
                UserId    = web.CurrentUser.ID.ToString(),
                Key       = EpmChartUserSettings.Key
            };

            var repo = new EpmChartUserSettingsRepository(web);

            return(repo.GetChartSettings(searchCriteria));
        }
예제 #2
0
        private void LoadChartUserSettings()
        {
            if (string.IsNullOrEmpty(PropChartWebPartId))
            {
                return;
            }

            var web            = SPContext.Current.Web;
            var repo           = new EpmChartUserSettingsRepository(web);
            var searchCriteria = new PersonalizationSearchCriteria
            {
                WebPartId = WebPartHelper.ConvertWebPartIdToGuid(PropChartWebPartId),
                WebId     = web.ID,
                SiteId    = web.Site.ID,
                UserId    = web.CurrentUser.ID.ToString(),
                Key       = EpmChartUserSettings.Key
            };

            _chartUserSettings = repo.GetChartSettings(searchCriteria);
        }
예제 #3
0
        private void PersistBubbleChartPersonalizations()
        {
            var web  = SPContext.Current.Web;
            var repo = new EpmChartUserSettingsRepository(web);

            var chartSettings = new EpmChartUserSettings
            {
                SiteId          = web.Site.ID,
                WebId           = web.ID,
                WebPartId       = WebPartHelper.ConvertWebPartIdToGuid(ID),
                UserId          = web.CurrentUser.ID.ToString(),
                ListId          = web.Lists[PropChartSelectedList].ID,
                XaxisField      = GetXaxisFieldSelection(),
                XaxisFieldLabel = GetXaxisFieldLabel(),
                YaxisFields     = GetYaxisSelections(),
                YaxisFieldLabel = GetYaxisFieldLabel(),
                ZaxisField      = GetZaxisFieldSelection(),
                ZaxisFieldLabel = GetZaxisFieldLabel(),
                ZaxisColorField = GetZaxisColorFieldSelection()
            };

            repo.PersistChartSettings(chartSettings);
        }