} //end page_load protected void ShowGroupSelect(int userId) { groupMessage.Text = ""; GroupDa gda = new GroupDa(); //get users existing groups DataSet uds = gda.GetUserGroupsByUserId(userId); rptUserGroups.DataSource = uds.Tables[0].DefaultView; rptUserGroups.DataBind(); if (uds.Tables[0].Rows.Count == 0) { groupMessage.Text = "No Groups Assigned"; } //get groups DataSet gds = gda.GetGroups(); UserGroup.DataSource = gds.Tables[0].DefaultView; UserGroup.DataValueField = "GroupId"; UserGroup.DataTextField = "GroupName"; UserGroup.DataBind(); UserGroup.Items.Insert(0, new ListItem("")); SelectGroupTable.Visible = true; }
} //end page_load protected void ShowGroupSelect(int datasetId) { datasetMessage.Text = ""; GroupDatasetDa da = new GroupDatasetDa(); //get users existing groups DataSet ds = da.GetGroupsByDatasetId(datasetId); rptDatasetGroups.DataSource = ds.Tables[0].DefaultView; rptDatasetGroups.DataBind(); if (ds.Tables[0].Rows.Count == 0) { datasetMessage.Text = "No Groups Assigned"; } //get groups GroupDa gda = new GroupDa(); DataSet gds = gda.GetGroups(); Group.DataSource = gds.Tables[0].DefaultView; Group.DataValueField = "GroupId"; Group.DataTextField = "GroupName"; Group.DataBind(); Group.Items.Insert(0, new ListItem("")); SelectDatasetTable.Visible = true; }
/// <summary> /// /// </summary> private void BuildUserGroups() { GroupDa gda = new GroupDa(); DataView groups = gda.GetGroups().Tables[0].DefaultView; GroupsRptr.DataSource = groups; GroupsRptr.DataBind(); GroupsCount.Text = groups.Count.ToString(); }
protected void ShowGroupList() { RepeaterDiv.Visible = true; AddGroupTable.Visible = false; GroupDa gda = new GroupDa(); DataSet uds = gda.GetGroups(); rptGroups.DataSource = uds.Tables[0].DefaultView; rptGroups.DataBind(); }
override protected void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { //get groups GroupDa gda = new GroupDa(); DataSet gds = gda.GetGroups(); SbGroup.DataSource = gds.Tables[0].DefaultView; SbGroup.DataValueField = "GroupId"; SbGroup.DataTextField = "GroupName"; SbGroup.DataBind(); SbGroup.Items.Insert(0, new ListItem("")); } }