Changeset 7893 for branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleSelectionListView.cs
- Timestamp:
- 05/24/12 11:22:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleSelectionListView.cs
r7876 r7893 32 32 33 33 public List<Role> CurrentRoles = new List<Role>(); 34 public User CurrentUser { get; set; } 34 35 private User currentUser; 36 public User CurrentUser { 37 get { return currentUser; } 38 set { 39 currentUser = value; 40 roleSelectionListView.Content = null; 41 storeButton.Enabled = false; 42 } 43 } 35 44 36 45 protected override void RefreshData() { … … 50 59 } else { 51 60 base.Content_Refreshing(sender, e); 61 storeButton.Enabled = false; 52 62 roleSelectionListView.Enabled = false; 53 63 } … … 59 69 } else { 60 70 base.Content_Refreshed(sender, e); 61 roleSelectionListView.Enabled = true; 71 if (Content.Roles != null) { 72 roleSelectionListView.Enabled = true; 73 storeButton.Enabled = true; 62 74 63 roleSelectionListView.Content = new ItemList<Role>(Content.Roles); 64 foreach (var role in CurrentRoles) { 65 foreach (ListViewItem lstRole in roleSelectionListView.ItemsListView.Items) { 66 if (((Role)lstRole.Tag).Equals(role)) { 67 lstRole.Checked = true; 75 roleSelectionListView.Content = new ItemList<Role>(Content.Roles); 76 foreach (var role in CurrentRoles) { 77 foreach (ListViewItem lstRole in roleSelectionListView.ItemsListView.Items) { 78 if (((Role)lstRole.Tag).Equals(role)) { 79 lstRole.Checked = true; 80 } 68 81 } 69 82 } 70 83 } 71 84 } 72 }73 74 protected override void DeregisterContentEvents() {75 base.DeregisterContentEvents();76 85 } 77 86
Note: See TracChangeset
for help on using the changeset viewer.