Changeset 17223
- Timestamp:
- 08/28/19 09:32:31 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs
r17180 r17223 95 95 descriptionTextBox.Text = Content.Description; 96 96 97 ownerComboBox.SelectedIndexChanged -= ownerComboBox_SelectedIndexChanged;98 97 if (AccessClient.Instance.UsersAndGroups != null) { 99 98 var users = AccessClient.Instance.UsersAndGroups.OfType<LightweightUser>(); … … 103 102 ownerComboBox.SelectedItem = users.FirstOrDefault(x => x.Id == projectOwnerId); 104 103 } 105 ownerComboBox.SelectedIndexChanged += ownerComboBox_SelectedIndexChanged;106 104 107 105 createdTextBox.Text = Content.DateCreated.ToString("ddd, dd.MM.yyyy, HH:mm:ss"); … … 175 173 var users = AccessClient.Instance.UsersAndGroups.OfType<LightweightUser>(); 176 174 if (Content != null && !Content.ParentProjectId.HasValue) users = users.Where(x => x.Roles.Select(y => y.Name).Contains(HiveRoles.Administrator)); 175 var projectOwnerId = Content != null ? Content.OwnerUserId : (Guid?)null; 177 176 ownerComboBox.DataSource = users.OrderBy(x => x.UserName).ToList(); 177 ownerComboBox.SelectedItem = projectOwnerId.HasValue ? users.FirstOrDefault(x => x.Id == projectOwnerId) : null; 178 178 ownerComboBox.SelectedIndexChanged += ownerComboBox_SelectedIndexChanged; 179 179 });
Note: See TracChangeset
for help on using the changeset viewer.