Exemple #1
0
    protected DataSet LoadSelectedItems_into_DataSet()
    {
        DataSet       ds  = new DataSet();
        List <string> lst = new List <string> {
            "groupID", "subjstatusID", "subjID"
        };

        if (RadioButtonList_mode.SelectedValue == "A")
        {
            string[] addA = new string[] { "timepointID", "actiontypeID", "studyactionID" };
            lst.AddRange(addA);
        }
        else if (RadioButtonList_mode.SelectedValue == "M")
        {
            string[] addM = new string[] { "timepointID", "measureID" };
            lst.AddRange(addM);
        }

        foreach (string s in lst)
        {
            UpdatePanel_O_CheckBoxes p = (UpdatePanel_O_CheckBoxes)Page.FindControlRecursive(s);
            DataTable dt = p.GetChecked_as_DataTable();
            dt.TableName = s;

            ds.Tables.Add(dt);
        }

        return(ds);
    }
Exemple #2
0
    protected void GetSelectedItems()
    {
        List <string> lst = new List <string> {
            "groupID", "subjstatusID", "timepointID", "actiontypeID", "studyactionID", "measureID", "subjID"
        };

        foreach (string s in lst)
        {
            UpdatePanel_O_CheckBoxes p = (UpdatePanel_O_CheckBoxes)Page.FindControlRecursive(s);
            DataTable dt = p.GetChecked_as_DataTable();
            GridView  gv = new GridView();
            gv.DataSource = dt;
            gv.DataBind();
            panel_test.Controls.Add(gv);

            string where = p.GetChecked_as_Where_Clause();

            lblInfo.Text += where + "<br/>";
        }
    }