- Timestamp:
- 03/31/16 16:59:16 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/User/UserViewModel.cs
r13740 r13741 1 using System; 1 using HeuristicLab.Clients.Access.Administration; 2 using System; 2 3 using System.Collections.Generic; 3 4 using System.Linq; … … 10 11 11 12 public string message { get; set; } 12 public List<string> users { get; set; }//temp 13 public AccessAdministrationClient accessClient { get; set; } 14 public List<Access.User> users { get; set; } 15 public List<Access.Role> roles { get; set; } 16 public List<Access.UserGroup> ugroups { get; set; } 13 17 14 public string SelectedUser { get; set; }//temp18 public Access.User SelectedUser { get; set; } 15 19 16 public UserViewModel( )20 public UserViewModel(AccessAdministrationClient ac) 17 21 { 18 users = new List<string>(); 22 users = new List<Access.User>(); 23 accessClient = ac; 24 SelectedUser = new Access.User(); 25 26 } 27 public UserViewModel refreshUsers() 28 { 29 accessClient.RefreshUsers(); 30 users = accessClient.Users.ToList(); 31 return this; 32 } 33 public UserViewModel refreshRoles() 34 { 35 accessClient.RefreshRoles(); 36 roles = accessClient.Roles.ToList(); 37 return this; 38 } 39 public UserViewModel refreshGroups() 40 { 41 accessClient.RefreshUserGroups(); 42 ugroups= accessClient.Groups.ToList(); 43 return this; 44 } 45 public Access.User getUserById(Guid id) 46 { 47 return users.Find(x => x.Id == id); 19 48 } 20 49 }
Note: See TracChangeset
for help on using the changeset viewer.