Exemplo n.º 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());
 }
Exemplo n.º 2
0
 void pwd_OnSave(Member obj)
 {
     OnSave(model);
     this.Close();
 }
Exemplo n.º 3
0
 public UserPasswordChange(Member m)
     : base()
 {
     model = m;
     InitializeComponent();
 }
Exemplo n.º 4
0
 public UserAdd(Member m)
     : base()
 {
     model = m;
     InitializeComponent();
 }
Exemplo n.º 5
0
 void form_OnSave(Member obj)
 {
     lvUsers.SetObjects(members.GetAllUsers());
 }