private void gridUsers_SelectionChanged(object sender, EventArgs e) { if (this.gridUsers.CurrentRow != null) { var user = (UserDto)this.gridUsers.CurrentRow.DataRow; if (user != null) { SecurityUserPresenter presenter = new SecurityUserPresenter(); if (user.RoleIdList == null || user.RoleIdList.Count == 0) { user.RoleIdList = presenter.GetUserRoleIds(user.UserId); } if (user.GroupIdList == null || user.GroupIdList.Count == 0) { user.GroupIdList = presenter.GetUserGroupIds(user.UserId); } groupBS.DataSource = view.BindGroups(user.GroupIdList); roleBS.DataSource = view.BindRoles(user.RoleIdList); this.iGridEXGrp.DataSource = groupBS; this.iGridEXRole.DataSource = roleBS; LoadAccounts(); //time consum ReloadTree(); } } }