Exemplo n.º 1
0
    protected DataTable LoadStructuresFromNDAR()
    {
        DataTable dt_fulllist;
        object    o = Session["StructuresFromNDAR"];

        if (o != null)
        {
            dt_fulllist = (DataTable)o;
        }
        else
        {
            dt_fulllist = NDAR.LoadFullDataStructureList("NDAR");
        }

        return(dt_fulllist);
    }
Exemplo n.º 2
0
    protected void LoadDataStructures(string source)
    {
        string where = txtWhere.Text;
        DataTable dt  = new System.Data.DataTable();
        SQL_utils sql = new SQL_utils("data");

        if (chkInStudy.Checked)
        {
            //UWAutism uwac = new UWAutism();
            //int studyID = uwac.Master_studyID;

            int studyID = sql.GetUserStudyID();

            dt = NDAR.LoadFullDataStructureList(source, where, chkUWview.Checked, studyID);
        }
        else
        {
            dt = NDAR.LoadFullDataStructureList(source, where, chkUWview.Checked);
        }


        string code_no_ndar = String.Format("select * from uwautism_research_backend..tblMeasure where " +
                                            " measureID in (select measureID from uwautism_research_backend..tblStudyMeas where studyID={0}) and measureID not in " +
                                            " ( select measureID from def.Tbl a " +
                                            " join NDAR_DS b ON a.tblname = b.uwtable  where measureID>0) "
                                            , Master.Master_studyID);


        DataTable dt_no_ndar = sql.DataTable_from_SQLstring(code_no_ndar);

        sql.Close();

        gridNoNDAR.DataSource = dt_no_ndar;
        gridNoNDAR.DataBind();

        //gvScroll.DataSource = dt;
        //gvScroll.DataBind();
        Session["datastructures"] = dt;

        grid.DataSource = dt;
        grid.DataBind();

        lblN.Text = "No. of Data Structures: " + dt.Rows.Count.ToString();
    }
Exemplo n.º 3
0
    protected void OpenAllViewdataTabs(object sender, EventArgs e)
    {
        SQL_utils sql = new SQL_utils("data");

        string where = txtWhere.Text;
        int studyID = sql.GetUserStudyID();

        DataTable dt = NDAR.LoadFullDataStructureList("localDB", where, chkUWview.Checked, studyID);

        int counter = 0;

        foreach (DataRow row in dt.Rows)
        {
            string shortName = row["shortName"].ToString();

            string url = "NDARview.aspx?shortName=";

            string url2 = String.Format("window.open('{0}{1}','_blank');", url, shortName);

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), String.Format("key{0}", counter), url2, true);
            counter++;
        }
    }
Exemplo n.º 4
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DataTable dt = NDAR.LoadFullDataStructureList("NDAR");

        SaveAllDataStructures(dt);
    }