Exemple #1
0
        public static void SetExcludedSystemEntities(List <string> lst, string categoryName)
        {
            var upValue = PerferenceUtility.GetUserPreferenceByKey(ActivityStreamExcludedEntities, categoryName, categoryName);
            var upkId   = PerferenceUtility.GetUserPreferenceKey(ActivityStreamExcludedEntities);

            var data = new UserPreferenceSelectedItemDataModel();

            data.UserPreferenceKeyId = upkId;
            UserPreferenceSelectedItemDataManager.Delete(data, SessionVariables.RequestProfile);

            foreach (var strValue in lst)
            {
                data = new UserPreferenceSelectedItemDataModel();
                data.UserPreferenceKeyId = upkId;
                data.ApplicationUserId   = SessionVariables.RequestProfile.AuditId;
                data.ParentKey           = upValue;
                data.Value     = strValue;
                data.SortOrder = 1;
                UserPreferenceSelectedItemDataManager.Create(data, SessionVariables.RequestProfile);
            }
        }