Пример #1
0
        private void SaveProjectSettings(ExtendedProjectViewModel projectViewModel)
        {
            var projectSettings = new ProjectSettings
            {
                Description = projectViewModel.Description,
                Categories  = projectViewModel.Categories,
                VisibleTo   = projectViewModel.VisibleTo
            };

            projectSettings.UpdateProjectEditInfo();
            _projectEnhancementsStore.Save(projectViewModel.Id, projectSettings);
        }
        private void ContentEvents_SavingContent(object sender, ContentEventArgs e)
        {
            if (!_currentProject.ProjectId.HasValue)
            {
                return;
            }

            var projectSettings = _projectEnhancementsStore.Load(_currentProject.ProjectId.Value);

            if (projectSettings == null)
            {
                projectSettings = new ProjectSettings();
            }

            projectSettings.UpdateProjectEditInfo();

            _projectEnhancementsStore.Save(_currentProject.ProjectId.Value, projectSettings);
        }