Changeset 7848 for branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/AccessAdministrationClient.cs
- Timestamp:
- 05/18/12 15:16:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/AccessAdministrationClient.cs
r7637 r7848 45 45 46 46 public ItemList<UserGroup> Groups { get; set; } 47 public ItemList<Role> Roles { get; set; } 47 48 #endregion 48 49 … … 67 68 ExecuteActionAsync(RefreshUserGroups, exceptionCallback); 68 69 } 70 71 public void RefreshRoles() { 72 Roles = new ItemList<Role>(); 73 Roles.AddRange(CallAccessService<ItemList<Role>>(s => new ItemList<Role>(s.GetRoles()))); 74 } 75 76 public void RefreshRolesAsync(Action<Exception> exceptionCallback) { 77 ExecuteActionAsync(RefreshRoles, exceptionCallback); 78 } 79 69 80 #endregion 70 81 … … 104 115 } 105 116 117 public void StoreRoles() { 118 foreach (Role g in Roles) { 119 if (g.Modified) { 120 CallAccessService(s => s.AddRole(g)); 121 g.SetUnmodified(); 122 } 123 } 124 } 125 126 public void StoreRolesAsync(Action<Exception> exceptionCallback) { 127 ExecuteActionAsync(StoreRoles, exceptionCallback); 128 } 129 106 130 //i don't think such a generic method is a good idea 107 131 /*public static void Store(IAccessItem item) { … … 127 151 Action deleteUserGroupAction = new Action(delegate { DeleteUserGroup(u); }); 128 152 ExecuteActionAsync(deleteUserGroupAction, exceptionCallback); 153 } 154 155 public void DeleteRole(Role u) { 156 CallAccessService(s => s.DeleteRole(u)); 157 } 158 159 public void DeleteRoleAsync(Role u, Action<Exception> exceptionCallback) { 160 Action deleteRoleAction = new Action(delegate { DeleteRole(u); }); 161 ExecuteActionAsync(deleteRoleAction, exceptionCallback); 129 162 } 130 163 #endregion
Note: See TracChangeset
for help on using the changeset viewer.