Ejemplo n.º 1
0
    protected void Load_coderpair_list(int measureID)
    {
        if (print_jminfo)
        {
            jminfo.Text += " ==>Load_coderpair_list..<br/>";
        }

        int mode = 1;

        if (chk_ShowNA.Checked)
        {
            mode = 0;
        }

        //DropDownList ddl = (DropDownList)UpdatePanel1.FindControl("ddlMeasure");
        //string sqlcode = "exec spRELv2_GET_RelTracking_by_measure " + _content_studyID.ToString() + ", " + ddl.SelectedValue.ToString();
        string sqlcode = "exec spRELv2_GET_RelTracking_CoderPairs_by_measure  " + _content_studyID.ToString() + ", " + measureID.ToString() + ", " + mode.ToString();


        //Coder pairs
        SqlCommand cmd = new SqlCommand();

        cmd.Connection  = oConnData;
        cmd.CommandType = CommandType.Text;
        cmd.CommandText = sqlcode;

        SqlDataAdapter da = new SqlDataAdapter(cmd);
        DataTable      dt = new DataTable();

        da.Fill(dt);

        //Persist the table in the Session object.
        Session["dt_coder_pairs_list"] = dt;

        //Bind the GridView control to the data source.
        GridView gv_coderpairs_list = (GridView)UpdatePanel_coderpairs_list.FindControl("gv_coderpairs_list");

        gv_coderpairs_list.DataSource = Session["dt_coder_pairs_list"];
        //gv_coderpairs_list.DataSource = dt_coder_pairs_list;
        gv_coderpairs_list.DataBind();

        UpdatePanel_coderpairs_list.Visible = true;
        UpdatePanel_coderpairs_list.Update();
    }
Ejemplo n.º 2
0
    protected void Load_coderpair_list(int measureID)
    {
        if (print_jminfo)
        {
            jminfo.Text += " ==>Load_coderpair_list..<br/>";
        }


        //Show the Measure Name
        SQL_utils sql1 = new SQL_utils("backend");


        string sqlcode_measname = "select measname from uwautism_research_backend..tblMeasure where measureID =  " + measureID.ToString();

        string measname = sql1.StringScalar_from_SQLstring(sqlcode_measname);

        sql1.Close();
        //lblPctCoded.Text = ddl.SelectedItem + "<br/>" + x;
        lblMeasName.Text = measname;


        int mode = 1;

        if (chk_ShowNA.Checked)
        {
            mode = 0;
        }


        string grps_csv = utilSelect2.getselected_CSVval(selGroups);

        //DropDownList ddl = (DropDownList)UpdatePanel1.FindControl("ddlMeasure");
        //string sqlcode = "exec spRELv2_GET_RelTracking_by_measure " + _content_studyID.ToString() + ", " + ddl.SelectedValue.ToString();
        string sqlcode = "";

        if (Request.QueryString["coderpair"] != null)
        {
            sqlcode = "exec spRELv2_GET_RelTracking_CoderPairs_by_measure  " + Master.Master_studyID.ToString() + ", " + measureID.ToString() + ", " + mode.ToString() + "," + Request.QueryString["coderpair"] + ",'" + grps_csv + "'";
        }
        else
        {
            sqlcode = "exec spRELv2_GET_RelTracking_CoderPairs_by_measure  " + Master.Master_studyID.ToString() + ", " + measureID.ToString() + ", " + mode.ToString() + ",0,0,0,'" + grps_csv + "'";
        }


        //Coder pairs
        //SqlCommand cmd = new SqlCommand();
        //cmd.Connection = oConnData;
        //cmd.CommandType = CommandType.Text;
        //cmd.CommandText = sqlcode;

        //SqlDataAdapter da = new SqlDataAdapter(cmd);
        //DataTable dt = new DataTable();
        //da.Fill(dt);
        SQL_utils sql = new SQL_utils("data");

        DataTable dt = sql.DataTable_from_SQLstring(sqlcode);

        //Persist the table in the Session object.
        Session["dt_coder_pairs_list"] = dt;

        //Bind the GridView control to the data source.
        GridView gv_coderpairs_list = (GridView)UpdatePanel_coderpairs_list.FindControl("gv_coderpairs_list");

        gv_coderpairs_list.DataSource = Session["dt_coder_pairs_list"];
        //gv_coderpairs_list.DataSource = dt_coder_pairs_list;
        gv_coderpairs_list.DataBind();

        UpdatePanel_coderpairs_list.Visible = true;
        UpdatePanel_coderpairs_list.Update();

        sql.Close();
    }