Exemple #1
0
 private void ChangeRoleViews(userprofile selected)
 {
     if (selected != null && selected.Roles != null)
     {
         RoleSource.Clear();
         foreach (var item in selected.Roles)
         {
             RoleSource.Add(item);
         }
         RolesView.Refresh();
         Roles.Refresh();
     }
 }
 public override void RemoveUserFromRole(string userName, string roleName)
 {
     RoleSource.RemoveUsersFromRoles(new[] { userName }, new[] { roleName });
 }
 public override void AddUserToRole(string userName, string roleName)
 {
     RoleSource.AddUsersToRoles(new[] { userName }, new[] { roleName });
 }