Ejemplo n.º 1
0
    private DataTable LoadData()
    {
        dtSystem   = MasterData.WTS_System_Get(SYSTEM_ID);
        systemName = dtSystem.Rows[0]["WTS_System"].ToString();

        DataSet   ds   = RQMT.RQMTDefectsImpact_Get(intRQMT_ID: RQMT_ID, intSYSTEM_ID: SYSTEM_ID);
        DataTable dt   = ds.Tables["Data"];
        DataTable dtSR = ds.Tables["SR"];

        dtTasks = ds.Tables["Tasks"];

        theDT          = dt;
        dtSRs          = dtSR;
        dtSRs_COMBINED = dtSR.CombineRowsOnColumn("TaskData", ",", false);

        for (var i = dt.Rows.Count - 1; i >= 0; i--)
        {
            DataRow row   = dt.Rows[i];
            DataRow srRow = dt.NewRow();
            srRow.ItemArray      = row.ItemArray.Clone() as object[];
            srRow["Description"] = "SRROW";
            dt.Rows.InsertAt(srRow, i + 1);

            DataRow taskRow = dt.NewRow();
            taskRow.ItemArray      = row.ItemArray.Clone() as object[];
            taskRow["Description"] = "TASKROW";
            dt.Rows.InsertAt(taskRow, i + 2);
        }
        dt.AcceptChanges();

        this.DCC = dt.Columns;
        Page.ClientScript.RegisterArrayDeclaration("_dcc", JsonConvert.SerializeObject(DCC, Newtonsoft.Json.Formatting.None));

        InitializeColumnData(ref dt);
        dt.AcceptChanges();

        return(dt);
    }