Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/12 16:16:18 (12 years ago)
Author:
ascheibe
Message:

#1648 added admin views for displaying user groups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/AccessAdministrationClient.cs

    r7614 r7635  
    4343      }
    4444    }
     45
     46    public ItemList<UserGroup> Groups { get; set; }
    4547    #endregion
    4648
     
    4850
    4951    #region Refresh
    50     public void Refresh() {
     52    public void RefreshUsers() {
    5153      users = new ItemList<User>();
    5254      users.AddRange(CallAccessService<ItemList<User>>(s => new ItemList<User>(s.GetAllUsers())));
    5355    }
    5456
    55     public void RefreshAsync(Action<Exception> exceptionCallback) {
    56       var call = new Func<Exception>(delegate() {
    57         try {
    58           OnRefreshing();
    59           Refresh();
    60         }
    61         catch (Exception ex) {
    62           return ex;
    63         }
    64         finally {
    65           OnRefreshed();
    66         }
    67         return null;
    68       });
    69       call.BeginInvoke(delegate(IAsyncResult result) {
    70         Exception ex = call.EndInvoke(result);
    71         if (ex != null) exceptionCallback(ex);
    72       }, null);
     57    public void RefreshUsersAsync(Action<Exception> exceptionCallback) {
     58      ExecuteActionAsync(RefreshUsers, exceptionCallback);
    7359    }
     60
     61    public void RefreshUserGroups() {
     62      Groups = new ItemList<UserGroup>();
     63      Groups.AddRange(CallAccessService<ItemList<UserGroup>>(s => new ItemList<UserGroup>(s.GetAllUserGroups())));
     64    }
     65
     66    public void RefreshUserGroupsAsync(Action<Exception> exceptionCallback) {
     67      ExecuteActionAsync(RefreshUserGroups, exceptionCallback);
     68    }
     69
    7470    public void ExecuteActionAsync(Action action, Action<Exception> exceptionCallback) {
    7571      var call = new Func<Exception>(delegate() {
Note: See TracChangeset for help on using the changeset viewer.