예제 #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());
 }