private void GetSelectedItems() { lstSelectedUserItems.Items.Clear(); if (CompanyGroupID != 0) { MyListViewItem listItem; BPCompanyUsers bp = new BPCompanyUsers(); BECompanyUsers ds = new BECompanyUsers(); ds = bp.SelectByCompanyGroupID(CompanyGroupID); foreach (BECompanyUsers.tbl_CompanyUsersRow user in ds.tbl_CompanyUsers) { listItem = lstSelectedUserItems.Items.Add(); listItem.CheckBox = true; listItem.ItemValue = user.CompanyUserID.ToString(); listItem.Text = user.CompanyUserFullName; } } }
private void ShowGroupUsers() { pnlUsers.Visible = true; if (_HasChangedUsers) { BPCompanyGroups groups = new BPCompanyGroups(); BECompanyGroups.tbl_CompanyGroupsRow group; DSCompanyGroups = groups.SelectCompanyGroupsByID(CompanyGroupID); group = DSCompanyGroups.tbl_CompanyGroups.FindByCompanyGroupID(CompanyGroupID); groups.Update(DSCompanyGroups); if (_HasChangedUsers) { groups.UpdateCompanyUsers(group.CompanyGroupID, UserGroupsList); } } BPCompanyUsers bp = new BPCompanyUsers(); DSCompanyUsers = bp.SelectByCompanyGroupID(CompanyGroupID); dgUsers.DataBind(); }