Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj	(revision 16059)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj	(revision 16060)
@@ -294,9 +294,4 @@
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Views\ProjectJobsView.resx">
-      <DependentUpon>ProjectJobsView.cs</DependentUpon>
-    </EmbeddedResource>
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectJobsView.Designer.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectJobsView.Designer.cs	(revision 16059)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectJobsView.Designer.cs	(revision 16060)
@@ -19,6 +19,6 @@
  */
 #endregion
+
 using HeuristicLab.Data.Views;
-using System;
 
 namespace HeuristicLab.Clients.Hive.Administrator.Views {
@@ -48,5 +48,4 @@
     private void InitializeComponent() {
       this.components = new System.ComponentModel.Container();
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProjectJobsView));
       this.refreshButton = new System.Windows.Forms.Button();
       this.removeButton = new System.Windows.Forms.Button();
@@ -57,5 +56,5 @@
       // refreshButton
       // 
-      this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image")));
+      this.refreshButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
       this.refreshButton.Location = new System.Drawing.Point(3, 3);
       this.refreshButton.Name = "refreshButton";
@@ -68,5 +67,5 @@
       // removeButton
       // 
-      this.removeButton.Image = ((System.Drawing.Image)(resources.GetObject("removeButton.Image")));
+      this.removeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Remove;
       this.removeButton.Location = new System.Drawing.Point(33, 3);
       this.removeButton.Name = "removeButton";
@@ -79,6 +78,6 @@
       // matrixView
       // 
-      this.matrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.matrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.matrixView.Caption = "StringConvertibleMatrix View";
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs	(revision 16059)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs	(revision 16060)
@@ -28,5 +28,4 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using System.Drawing;
 
 namespace HeuristicLab.Clients.Hive.Administrator.Views {
@@ -115,5 +114,5 @@
 
         indefiniteCheckBox.Checked = !Content.EndDate.HasValue;
-        if(!indefiniteCheckBox.Checked) endDateTimePicker.Value = Content.EndDate.Value;
+        if (!indefiniteCheckBox.Checked) endDateTimePicker.Value = Content.EndDate.Value;
         else endDateTimePicker.Value = Content.StartDate;
         endDateTimePicker.Enabled = !indefiniteCheckBox.Checked;
@@ -134,5 +133,5 @@
       indefiniteCheckBox.Enabled = enabled;
 
-      if(Content != null) {
+      if (Content != null) {
         var parentProject = HiveAdminClient.Instance.GetAvailableProjectAncestors(Content.Id).LastOrDefault();
         if (parentProject == null || parentProject.EndDate.HasValue) {
@@ -152,5 +151,6 @@
     #region Event Handlers
     private void Content_PropertyChanged(object sender, PropertyChangedEventArgs e) {
-      OnContentChanged();
+      if (InvokeRequired) Invoke((Action<object, PropertyChangedEventArgs>)Content_PropertyChanged, sender, e);
+      else OnContentChanged();
     }
 
@@ -220,5 +220,5 @@
         Content.Name = nameTextBox.Text;
         RegisterContentEvents();
-      }        
+      }
     }
 
@@ -228,5 +228,5 @@
         Content.Description = descriptionTextBox.Text;
         RegisterContentEvents();
-      }        
+      }
     }
 
@@ -238,5 +238,5 @@
         Content.OwnerUserId = selectedOwnerUserId;
         RegisterContentEvents();
-      }        
+      }
     }
 
@@ -248,5 +248,5 @@
         var parentProject = HiveAdminClient.Instance.GetAvailableProjectAncestors(Content.Id).LastOrDefault();
         if (parentProject != null) {
-          if(startDateTimePicker.Value < parentProject.StartDate)
+          if (startDateTimePicker.Value < parentProject.StartDate)
             startDateTimePicker.Value = parentProject.StartDate;
         } else {
@@ -261,5 +261,5 @@
         Content.StartDate = startDateTimePicker.Value;
         RegisterContentEvents();
-      }        
+      }
 
       startDateTimePicker.ValueChanged += startDateTimePicker_ValueChanged;
@@ -276,5 +276,5 @@
             endDateTimePicker.Value = parentProject.EndDate.Value;
           }
-        } else if(Content.EndDate.HasValue) {
+        } else if (Content.EndDate.HasValue) {
           endDateTimePicker.Value = Content.EndDate.Value;
         }
@@ -287,5 +287,5 @@
         Content.EndDate = endDateTimePicker.Value;
         RegisterContentEvents();
-      }        
+      }
 
       endDateTimePicker.ValueChanged += endDateTimePicker_ValueChanged;
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj	(revision 16059)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj	(revision 16060)
@@ -247,6 +247,6 @@
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Views\RefreshableHiveJobView.resx">
-      <DependentUpon>RefreshableHiveJobView.cs</DependentUpon>
+    <EmbeddedResource Include="Views\RefreshableHiveJobListView.resx">
+      <DependentUpon>RefreshableHiveJobListView.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs	(revision 16059)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs	(revision 16060)
@@ -22,5 +22,8 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Threading;
+using System.Windows.Forms;
+using HeuristicLab.Clients.Hive.JobManager.Views;
 using HeuristicLab.Core;
 using HeuristicLab.MainForm;
@@ -28,7 +31,4 @@
 using HeuristicLab.Optimizer;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Clients.Hive.JobManager.Views;
-using System.Windows.Forms;
-using System.Linq;
 
 namespace HeuristicLab.Clients.Hive.JobManager {
@@ -85,4 +85,9 @@
       task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun;
 
+      if (HiveClient.Instance.Projects.Count == 1) {
+        var project = HiveClient.Instance.Projects.FirstOrDefault();
+        if (project != null && project.Id != Guid.Empty)
+          rJob.Job.ProjectId = project.Id;
+      }
 
       var hiveResourceSelectorDialog = new HiveResourceSelectorDialog(rJob.Job.Id, rJob.Job.ProjectId);
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.Designer.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.Designer.cs	(revision 16059)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.Designer.cs	(revision 16060)
@@ -46,5 +46,4 @@
     private void InitializeComponent() {
       this.components = new System.ComponentModel.Container();
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RefreshableHiveJobView));
       this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
       this.tasksTabPage = new System.Windows.Forms.TabPage();
@@ -150,5 +149,5 @@
       // refreshPermissionsButton
       // 
-      this.refreshPermissionsButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshPermissionsButton.Image")));
+      this.refreshPermissionsButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
       this.refreshPermissionsButton.Location = new System.Drawing.Point(3, 3);
       this.refreshPermissionsButton.Name = "refreshPermissionsButton";
@@ -253,5 +252,5 @@
       // 
       this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.startButton.Image = ((System.Drawing.Image)(resources.GetObject("startButton.Image")));
+      this.startButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
       this.startButton.Location = new System.Drawing.Point(0, 564);
       this.startButton.Name = "startButton";
@@ -265,5 +264,5 @@
       // 
       this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.stopButton.Image = ((System.Drawing.Image)(resources.GetObject("stopButton.Image")));
+      this.stopButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Stop;
       this.stopButton.Location = new System.Drawing.Point(60, 564);
       this.stopButton.Name = "stopButton";
@@ -297,5 +296,5 @@
       this.pauseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
       this.pauseButton.Enabled = false;
-      this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton.Image")));
+      this.pauseButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Pause;
       this.pauseButton.Location = new System.Drawing.Point(30, 564);
       this.pauseButton.Name = "pauseButton";
@@ -366,5 +365,5 @@
       // refreshButton
       // 
-      this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image")));
+      this.refreshButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
       this.refreshButton.Location = new System.Drawing.Point(3, 0);
       this.refreshButton.Name = "refreshButton";
@@ -377,5 +376,5 @@
       // updateButton
       // 
-      this.updateButton.Image = ((System.Drawing.Image)(resources.GetObject("updateButton.Image")));
+      this.updateButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Save;
       this.updateButton.Location = new System.Drawing.Point(30, 0);
       this.updateButton.Name = "updateButton";
@@ -388,5 +387,5 @@
       // UnloadButton
       // 
-      this.UnloadButton.Image = ((System.Drawing.Image)(resources.GetObject("UnloadButton.Image")));
+      this.UnloadButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Disconnect;
       this.UnloadButton.Location = new System.Drawing.Point(57, 0);
       this.UnloadButton.Name = "UnloadButton";
@@ -399,5 +398,5 @@
       // searchButton
       // 
-      this.searchButton.Image = ((System.Drawing.Image)(resources.GetObject("searchButton.Image")));
+      this.searchButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Zoom;
       this.searchButton.Location = new System.Drawing.Point(71, 79);
       this.searchButton.Name = "searchButton";
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveService.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveService.cs	(revision 16059)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveService.cs	(revision 16060)
@@ -333,5 +333,5 @@
             .Where(x => x.State == DA.JobState.Online
                           && (x.OwnerUserId == currentUserId
-                            || x.JobPermissions.Count(y => y.Permission != DA.Permission.NotAllowed 
+                            || x.JobPermissions.Count(y => y.Permission != DA.Permission.NotAllowed
                               && y.GrantedUserId == currentUserId) > 0)
                           )
@@ -359,5 +359,5 @@
             .ToList();
 
-          if(administrationGrantedProjects.Select(x => x.ProjectId).Contains(projectId)) {
+          if (administrationGrantedProjects.Select(x => x.ProjectId).Contains(projectId)) {
             var jobs = jobDao.GetByProjectId(projectId)
             .Select(x => x.ToDto())
@@ -388,5 +388,5 @@
           var requestedAndGrantedProjectIds = projectIds.Intersect(administrationGrantedProjectIds);
 
-          if(requestedAndGrantedProjectIds.Any()) {
+          if (requestedAndGrantedProjectIds.Any()) {
             var jobs = jobDao.GetByProjectIds(requestedAndGrantedProjectIds)
               .Select(x => x.ToDto())
@@ -415,5 +415,5 @@
       // check project - resources
       AuthorizationManager.AuthorizeProjectForResourcesUse(jobDto.ProjectId, resourceIds);
-      
+
       using (new PerformanceLogger("AddJob")) {
         var jobDao = pm.JobDao;
@@ -426,5 +426,5 @@
 
           // add resource assignments
-          if (resourceIds != null && resourceIds.Any()) {           
+          if (resourceIds != null && resourceIds.Any()) {
             newJob.AssignedJobResources.AddRange(resourceIds.Select(
               x => new DA.AssignedJobResource {
@@ -467,5 +467,5 @@
             exists = false;
             job = new DA.Job();
-          } else if(job.State != DA.JobState.Online) {
+          } else if (job.State != DA.JobState.Online) {
             throw new InvalidOperationException(NO_JOB_UPDATE_POSSIBLE);
           }
@@ -480,8 +480,8 @@
                 x => new DA.AssignedJobResource {
                   ResourceId = x
-              }));
+                }));
             }
             jobDao.Save(job);
-          } else if(resourceIds != null) {
+          } else if (resourceIds != null) {
             var addedJobResourceIds = resourceIds.Except(job.AssignedJobResources.Select(x => x.ResourceId));
             var removedJobResourceIds = job.AssignedJobResources
@@ -489,7 +489,7 @@
               .Except(resourceIds)
               .ToArray();
-            
+
             // remove resource assignments
-            foreach(var rid in removedJobResourceIds) {
+            foreach (var rid in removedJobResourceIds) {
               var ajr = job.AssignedJobResources.Where(x => x.ResourceId == rid).SingleOrDefault();
               if (ajr != null) job.AssignedJobResources.Remove(ajr);
@@ -515,5 +515,5 @@
         pm.UseTransaction(() => {
           var job = jobDao.GetById(jobId);
-          if(job != null) {
+          if (job != null) {
             var jobStateEntity = jobState.ToEntity();
             // note: allow solely state changes from "Online" to "StatisticsPending" = deletion request by user for HiveStatisticGenerator
@@ -521,15 +521,15 @@
             if (job.State == DA.JobState.Online && jobStateEntity == DA.JobState.StatisticsPending) {
               job.State = jobStateEntity;
-              foreach(var task in job.Tasks
-              .Where(x => x.State == DA.TaskState.Waiting 
-                || x.State == DA.TaskState.Paused 
+              foreach (var task in job.Tasks
+              .Where(x => x.State == DA.TaskState.Waiting
+                || x.State == DA.TaskState.Paused
                 || x.State == DA.TaskState.Offline)) {
                 task.State = DA.TaskState.Aborted;
               }
               pm.SubmitChanges();
-            } else if(job.State == DA.JobState.StatisticsPending && jobStateEntity == DA.JobState.DeletionPending) {
+            } else if (job.State == DA.JobState.StatisticsPending && jobStateEntity == DA.JobState.DeletionPending) {
               job.State = jobStateEntity;
               pm.SubmitChanges();
-            } 
+            }
           }
         });
@@ -549,5 +549,5 @@
         var projectDao = pm.ProjectDao;
         pm.UseTransaction(() => {
-          foreach(var jobId in jobIds) {
+          foreach (var jobId in jobIds) {
             var job = jobDao.GetById(jobId);
             if (job != null) {
@@ -560,5 +560,5 @@
               if (isAdministrator || administrationGrantedProjects.Contains(job.Project)) {
                 // note: allow solely state changes from "Online" to "StatisticsPending" = deletion request by user for HiveStatisticGenerator
-                if (job.State == DA.JobState.Online) { 
+                if (job.State == DA.JobState.Online) {
                   job.State = DA.JobState.StatisticsPending;
                   foreach (var task in job.Tasks
@@ -566,5 +566,5 @@
                     || x.State == DA.TaskState.Paused
                     || x.State == DA.TaskState.Offline)) {
-                      task.State = DA.TaskState.Aborted;
+                    task.State = DA.TaskState.Aborted;
                   }
                   pm.SubmitChanges();
@@ -772,5 +772,5 @@
       bool isAdmin = RoleVerifier.IsInRole(HiveRoles.Administrator);
       if (!isAdmin) {
-        if(projectDto != null && projectDto.ParentProjectId.HasValue) {
+        if (projectDto != null && projectDto.ParentProjectId.HasValue) {
           AuthorizationManager.AuthorizeForProjectAdministration(projectDto.ParentProjectId.Value, false);
         } else {
@@ -794,5 +794,5 @@
           var project = projectDao.Save(projectDto.ToEntity());
 
-          var parentProjects = projectDao.GetParentProjectsById(project.ProjectId);
+          var parentProjects = projectDao.GetParentProjectsById(project.ProjectId).ToList();
           bool isParent = parentProjects.Select(x => x.OwnerUserId == UserManager.CurrentUserId).Any();
 
@@ -826,8 +826,8 @@
       // check if current (non-admin) user is owner of the project or the projectDto's-parents
       // note: non-admin users are not allowed to administer root projects (i.e. projects without parental entry)
-      bool isAdmin = RoleVerifier.IsInRole(HiveRoles.Administrator);      
+      bool isAdmin = RoleVerifier.IsInRole(HiveRoles.Administrator);
       if (!isAdmin) {
         if (projectDto != null && projectDto.ParentProjectId.HasValue) {
-          AuthorizationManager.AuthorizeForProjectAdministration(projectDto.Id, false);          
+          AuthorizationManager.AuthorizeForProjectAdministration(projectDto.Id, false);
         } else {
           throw new SecurityException(NOT_AUTHORIZED_USERPROJECT);
@@ -836,11 +836,11 @@
 
       // check that non-admins can not be set as owner of root projects
-      if(projectDto != null && !projectDto.ParentProjectId.HasValue) {
+      if (projectDto != null && !projectDto.ParentProjectId.HasValue) {
         var owner = UserManager.GetUserById(projectDto.OwnerUserId);
-        if(owner == null || !RoleVerifier.IsUserInRole(owner.UserName, HiveRoles.Administrator)) {
+        if (owner == null || !RoleVerifier.IsUserInRole(owner.UserName, HiveRoles.Administrator)) {
           throw new SecurityException(NOT_AUTHORIZED_PROJECTOWNER);
         }
       }
-      
+
       var pm = PersistenceManager;
       using (new PerformanceLogger("UpdateProject")) {
@@ -850,5 +850,5 @@
           var project = projectDao.GetById(projectDto.Id);
           if (project != null) { // (1) update existent project
-            var parentProjects = projectDao.GetParentProjectsById(project.ProjectId);
+            var parentProjects = projectDao.GetParentProjectsById(project.ProjectId).ToList();
             bool isParent = parentProjects.Select(x => x.OwnerUserId == UserManager.CurrentUserId).Any();
 
@@ -893,5 +893,5 @@
             var newProject = projectDao.Save(projectDto.ToEntity());
 
-            var parentProjects = projectDao.GetParentProjectsById(project.ProjectId);
+            var parentProjects = projectDao.GetParentProjectsById(project.ProjectId).ToList();
             bool isParent = parentProjects.Select(x => x.OwnerUserId == UserManager.CurrentUserId).Any();
 
@@ -925,5 +925,5 @@
       // check if current (non-admin) user is owner of one of the projectDto's-parents
       // note: non-admin users are not allowed to administer root projects (i.e. projects without parental entry)
-      if (!RoleVerifier.IsInRole(HiveRoles.Administrator)) {        
+      if (!RoleVerifier.IsInRole(HiveRoles.Administrator)) {
         AuthorizationManager.AuthorizeForProjectAdministration(projectId, true);
       }
@@ -942,5 +942,5 @@
             .ToList();
 
-          if(jobs.Count > 0) {
+          if (jobs.Count > 0) {
             throw new InvalidOperationException("There are " + jobs.Count + " job(s) using this project and/or child-projects. It is necessary to delete them before the project.");
           } else {
@@ -966,5 +966,5 @@
           .Where(x => x.ProjectId == projectId)
           .Select(x => x.ToDto())
-          .SingleOrDefault(); 
+          .SingleOrDefault();
         });
       }
@@ -995,7 +995,7 @@
       using (new PerformanceLogger("GetProjectsForAdministration")) {
         var projectDao = pm.ProjectDao;
-        
-        return pm.UseTransaction(() => {
-          if(isAdministrator) {
+
+        return pm.UseTransaction(() => {
+          if (isAdministrator) {
             return projectDao.GetAll().Select(x => x.ToDto()).ToList();
           } else {
@@ -1012,5 +1012,5 @@
       RoleVerifier.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client);
       var pm = PersistenceManager;
-      using(new PerformanceLogger("GetProjectGenealogy")) {
+      using (new PerformanceLogger("GetProjectGenealogy")) {
         var projectDao = pm.ProjectDao;
         var projectAncestors = new Dictionary<Guid, HashSet<Guid>>();
@@ -1020,5 +1020,5 @@
           foreach (var p in projects) {
             var parentProject = p.ParentProject;
-            while(parentProject != null) {
+            while (parentProject != null) {
               projectAncestors[p.ProjectId].Add(parentProject.ProjectId);
               parentProject = parentProject.ParentProject;
@@ -1039,5 +1039,5 @@
           projectDao
             .GetAll().ToList()
-            .ForEach(p=> projectNames.Add(p.ProjectId, p.Name));
+            .ForEach(p => projectNames.Add(p.ProjectId, p.Name));
           return projectNames;
         });
@@ -1063,5 +1063,5 @@
 
           // guarantee that project owner is always permitted
-          if(!grantedUserIds.Contains(project.OwnerUserId)) {
+          if (!grantedUserIds.Contains(project.OwnerUserId)) {
             grantedUserIds.Add(project.OwnerUserId);
           }
@@ -1115,5 +1115,5 @@
           // add project permissions
           foreach (var id in grantedUserIds) {
-            if(project.ProjectPermissions.All(x => x.GrantedUserId != id)) {
+            if (project.ProjectPermissions.All(x => x.GrantedUserId != id)) {
               project.ProjectPermissions.Add(new DA.ProjectPermission {
                 GrantedUserId = id,
@@ -1135,5 +1135,5 @@
             }
 
-            foreach(var p in childProjects) {
+            foreach (var p in childProjects) {
               var cpAssignedPermissions = p.ProjectPermissions.Select(x => x.GrantedUserId).ToList();
               // guarantee that project owner is always permitted
@@ -1144,5 +1144,5 @@
 
               // remove left-over job assignments (for non-reassignments)
-              if(!reassignCascading) {
+              if (!reassignCascading) {
                 assignedJobResourceDao.DeleteByProjectIdAndUserIds(p.ProjectId, cpRemovedPermissions);
               }
@@ -1152,6 +1152,6 @@
                 p.ProjectPermissions.Clear();
               } else {
-                foreach(var item in p.ProjectPermissions
-                  .Where(x => x.GrantedUserId != p.OwnerUserId 
+                foreach (var item in p.ProjectPermissions
+                  .Where(x => x.GrantedUserId != p.OwnerUserId
                     && (removedPermissions.Contains(x.GrantedUserId) || cpRemovedPermissions.Contains(x.GrantedUserId)))
                   .ToList()) {
@@ -1237,6 +1237,6 @@
         pm.UseTransaction(() => {
           var project = projectDao.GetById(projectId);
-          
-          var parentProjects = projectDao.GetParentProjectsById(project.ProjectId);
+
+          var parentProjects = projectDao.GetParentProjectsById(project.ProjectId).ToList();
           bool isParent = parentProjects.Select(x => x.OwnerUserId == UserManager.CurrentUserId).Any();
 
@@ -1246,5 +1246,5 @@
 
           // if user is admin or owner of parent project(s)
-          if(isAdmin || isParent) {
+          if (isAdmin || isParent) {
             // remove job and project assignments
             if (reassign) {
@@ -1288,5 +1288,5 @@
 
               // remove left-over job assignments (for non-reassignments)
-              if(!reassignCascading) {
+              if (!reassignCascading) {
                 assignedJobResourceDao.DeleteByProjectIdAndResourceIds(p.ProjectId, cpRemovedAssignments);
               }
@@ -1306,5 +1306,5 @@
               // add project assignments
               foreach (var id in resourceIds) {
-                if(p.AssignedProjectResources.All(x => x.ResourceId != id)) {
+                if (p.AssignedProjectResources.All(x => x.ResourceId != id)) {
                   p.AssignedProjectResources.Add(new DA.AssignedProjectResource {
                     ResourceId = id
@@ -1373,5 +1373,5 @@
     public IEnumerable<DT.AssignedProjectResource> GetAssignedResourcesForProjectsAdministration(IEnumerable<Guid> projectIds) {
       RoleVerifier.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client);
-      foreach(var id in projectIds)
+      foreach (var id in projectIds)
         AuthorizationManager.AuthorizeForProjectAdministration(id, false);
 
@@ -1572,8 +1572,8 @@
           var resources = resourceDao.GetAll().ToList();
           resources.ForEach(r => resourceAncestors.Add(r.ResourceId, new HashSet<Guid>()));
-          
-          foreach(var r in resources) {
+
+          foreach (var r in resources) {
             var parentResource = r.ParentResource;
-            while(parentResource != null) {
+            while (parentResource != null) {
               resourceAncestors[r.ResourceId].Add(parentResource.ResourceId);
               parentResource = parentResource.ParentResource;
@@ -1815,10 +1815,10 @@
       return user != null ? (Guid?)user.ProviderUserKey ?? Guid.Empty : Guid.Empty;
     }
-    
+
     public Dictionary<Guid, HashSet<Guid>> GetUserGroupTree() {
       var userGroupTree = new Dictionary<Guid, HashSet<Guid>>();
       var userGroupMapping = UserManager.GetUserGroupMapping();
 
-      foreach(var ugm in userGroupMapping) {
+      foreach (var ugm in userGroupMapping) {
         if (ugm.Parent == null || ugm.Child == null) continue;
 
@@ -1836,5 +1836,5 @@
       bool isAdministrator = RoleVerifier.IsInRole(HiveRoles.Administrator);
       var pm = PersistenceManager;
-      using(new PerformanceLogger("CheckAccessToAdminAreaGranted")) {
+      using (new PerformanceLogger("CheckAccessToAdminAreaGranted")) {
         if (isAdministrator) {
           return true;
@@ -1907,5 +1907,5 @@
       if (jobs == null || !jobs.Any()) return;
 
-      var currentUserId = UserManager.CurrentUserId;      
+      var currentUserId = UserManager.CurrentUserId;
       var taskDao = pm.TaskDao;
       var jobPermissionDao = pm.JobPermissionDao;
