Exemple #1
0
    private DataTable GetQuestionSubDataTable(DataTable dt, DataList dl)
    {
        // TOTALPOINT = 0;

        for (int i = 0; i < dl.Items.Count; i++)
        {
            RadioButtonList rBtnList    = dl.Items[i].FindControl("rBtnList") as RadioButtonList;
            TextBox         txtValue    = dl.Items[i].FindControl("txtLevelValue") as TextBox;
            HiddenField     hdfSubItmYN = dl.Items[i].FindControl("tmpSubItmYN") as HiddenField;

            Q_SBJ_ID = dl.DataKeys[dl.Items[i].ItemIndex].ToString();
            Q_ITM_ID = rBtnList.SelectedValue;


            Biz_QuestionItems    questionItems    = new Biz_QuestionItems(Q_ITM_ID, Q_SBJ_ID, Q_OBJ_ID);
            Biz_QuestionSubjects questionSubjects = new Biz_QuestionSubjects(Q_SBJ_ID);


            DataRow dataRow = dt.NewRow();

            if (hdfSubItmYN.Value == "1")
            {
                txtValueText = txtValue.Text;

                dataRow["COMP_ID"]         = COMP_ID;
                dataRow["EST_ID"]          = EST_ID;
                dataRow["ESTTERM_REF_ID"]  = ESTTERM_REF_ID;
                dataRow["ESTTERM_SUB_ID"]  = ESTTERM_SUB_ID;
                dataRow["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID;
                dataRow["EST_DEPT_ID"]     = EST_DEPT_ID;
                dataRow["EST_EMP_ID"]      = EST_EMP_ID;
                dataRow["PRJ_REF_ID"]      = PRJ_REF_ID;
                dataRow["Q_OBJ_ID"]        = Q_OBJ_ID;
                dataRow["Q_SBJ_ID"]        = Q_SBJ_ID;
                dataRow["Q_ITM_ID"]        = Q_ITM_ID;
                dataRow["POINT"]           = txtValue.Text;
                dataRow["GRADE_ID"]        = "";
                dataRow["TEXT_VALUE"]      = txtValue.Text;
                dataRow["OPINION"]         = "";
                dataRow["ATTACH_NO"]       = "";
                dataRow["USER"]            = EMP_REF_ID;
            }
            else
            {
                dataRow["COMP_ID"]         = COMP_ID;
                dataRow["EST_ID"]          = EST_ID;
                dataRow["ESTTERM_REF_ID"]  = ESTTERM_REF_ID;
                dataRow["ESTTERM_SUB_ID"]  = ESTTERM_SUB_ID;
                dataRow["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID;
                dataRow["EST_DEPT_ID"]     = EST_DEPT_ID;
                dataRow["EST_EMP_ID"]      = EST_EMP_ID;
                dataRow["PRJ_REF_ID"]      = PRJ_REF_ID;
                dataRow["Q_OBJ_ID"]        = Q_OBJ_ID;
                dataRow["Q_SBJ_ID"]        = Q_SBJ_ID;
                dataRow["Q_ITM_ID"]        = Q_ITM_ID;
                dataRow["POINT"]           = questionItems.Point;
                dataRow["GRADE_ID"]        = "";
                dataRow["TEXT_VALUE"]      = txtValue.Text;
                dataRow["OPINION"]         = "";
                dataRow["ATTACH_NO"]       = "";
                dataRow["USER"]            = EMP_REF_ID;
            }

            dt.Rows.Add(dataRow);
        }
        return(dt);
    }