コード例 #1
0
		private void GetSelectedItems()
		{
			lstSelectedUserItems.Items.Clear();

			if (GroupID != 0)
			{
				MyListViewItem listItem;

				BPUsers bp = new BPUsers();
				BEUsers ds = new BEUsers();
				ds = bp.SelectByGroupID(GroupID);

				foreach (BEUsers.tbl_UsersRow user in ds.tbl_Users)
				{
					listItem = lstSelectedUserItems.Items.Add();
					listItem.CheckBox = true;
					listItem.ItemValue = user.UserID.ToString();
					listItem.Text = user.UserFullName;
				}
			}
		}
コード例 #2
0
ファイル: BrowseUsers.aspx.cs プロジェクト: alexan1/marketweb
		private void BindDSUsers()
		{
			BPUsers bpUsers = new BPUsers();
			if (lstGroups.SelectedValue == "-1")
			{
				DSUsers = bpUsers.SelectAllAdministrators();
			}
			else
			{
				DSUsers = bpUsers.SelectByGroupID(Convert.ToInt32(lstGroups.SelectedValue));
			}

			DSUsers.tbl_Users.DefaultView.RowFilter = RowFilter("UserFullName", "UserActive");

			letters_Bind();
			dgUsers.DataBind();

			SetPagerButtons();
			if (DSUsers.tbl_Users.DefaultView.Count ==  0)
			{
				lblError.Visible = true;
				lblError.Text = "0 Records found.";
			}

			else
			{
				lblError.Visible = false;
				lblError.Text = "";
			}
		}
コード例 #3
0
		private void ShowGroupUsers()
		{
			pnlUsers.Visible = true;

			if (_HasChangedUsers)
			{
				BPGroups groups = new BPGroups();
				BEGroups.tbl_GroupsRow group;
			
				DSGroups = groups.SelectByIDWithUserGroups(GroupID);
				group = DSGroups.tbl_Groups.FindByGroupID(GroupID);

				groups.Update(DSGroups);
				if (_HasChangedUsers)
				{
					groups.UpdateUsers(group.GroupID, UserGroupsList);
				}
			}
				
			BPUsers bp = new BPUsers();
			DSUsers = bp.SelectByGroupID(GroupID);
			dgUsers.DataBind();
		}