private void InitTestGroup() { DataSet ds = TestGroupManage.GetTestGroupByType("1"); DropDownListTestGroup.DataSource = ds; DropDownListTestGroup.DataTextField = "NAME"; DropDownListTestGroup.DataValueField = "GROUP_ID"; DropDownListTestGroup.DataBind(); }
protected void TestGroup() { DataTable dttestgroup; if (CheckBoxsubgroup.Checked == true) { DropDownListTestSubGroup.Enabled = true; if (DropDownListTestGroup.SelectedIndex > 0) { dttestgroup = operation.GetTestGroup(DropDownListTestGroup.SelectedValue, 3); if (dttestgroup != null) { DropDownListTestSubGroup.DataSource = dttestgroup; DropDownListTestSubGroup.DataTextField = "Name"; DropDownListTestSubGroup.DataValueField = "TestGroupID"; DropDownListTestSubGroup.DataBind(); DropDownListTestSubGroup.Items.Insert(0, new ListItem("Select Sub Group", "0")); } } } else { dttestgroup = operation.GetTestGroup("0", 2); if (dttestgroup != null) { DropDownListTestGroup.DataSource = dttestgroup; DropDownListTestGroup.DataTextField = "Name"; DropDownListTestGroup.DataValueField = "TestGroupID"; DropDownListTestGroup.DataBind(); DropDownListTestGroup.Items.Insert(0, new ListItem("Select Group", "0")); DropDownListModalGroup.DataSource = dttestgroup; DropDownListModalGroup.DataTextField = "Name"; DropDownListModalGroup.DataValueField = "TestGroupID"; DropDownListModalGroup.DataBind(); DropDownListModalGroup.Items.Insert(0, new ListItem("Select Group", "0")); } } }