Пример #1
0
 public void LoadLists(Member user)
 {
     available.Clear();
     selected.Clear();
     var roles = repo.GetAllRoles();
     foreach (var item in roles)
     {
         if (!string.IsNullOrEmpty(user.Username) && Roles.IsUserInRole(user.Username, item.RoleName))
             selected.Add(item);
         else
             available.Add(item);
     }
         lstAvailable.SetObjects(available.OrderBy(i => i.RoleName).ToList());
     lstSelected.SetObjects(selected.OrderBy(i => i.RoleName).ToList());
 }
Пример #2
0
 void pwd_OnSave(Member obj)
 {
     OnSave(model);
     this.Close();
 }
Пример #3
0
 public UserPasswordChange(Member m)
     : base()
 {
     model = m;
     InitializeComponent();
 }
Пример #4
0
 public UserAdd(Member m)
     : base()
 {
     model = m;
     InitializeComponent();
 }
Пример #5
0
 void form_OnSave(Member obj)
 {
     lvUsers.SetObjects(members.GetAllUsers());
 }