예제 #1
0
        }        //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;
        }
예제 #2
0
        }        //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;
        }
예제 #3
0
        /// <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();
        }
예제 #4
0
        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();
        }
예제 #5
0
 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(""));
     }
 }