private void PopulateUsers() { SystemUserData data = new SystemUserData(); List <SystemUser> list = data.GetList().ConvertAll(x => x as SystemUser); cmbUserName.ValueMember = "PersonId"; cmbUserName.DisplayMember = "UserName"; cmbUserName.DataSource = list; cmbUserName.SelectedIndex = -1; }
private void PopulateUsers() { dgSystemUsers.AutoGenerateColumns = false; _userList = sud.GetList().ConvertAll(x => x as SystemUser); dgSystemUsers.DataSource = null; dgSystemUsers.DataSource = _userList; dgSystemUsers.Refresh(); lblUserCount.Text = "User count: " + _userList.Count; lblUserCount.Refresh(); }