Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                pssid = Request.Params["ps_sid"] == null ? "" : Request.Params["ps_sid"].Trim();
                stageName = DBUtility.DbHelperSQL.GetSingle("select stage_name from stage where sid=" + pssid).ToString().Trim();

                //动态添加实施列
                string dynamicColumn = "";
                DataTable impDT = new DataTable();
                DataSet impDS = new BLL.project_stage_implement_model().GetList(" s_sid='" + pssid + "'");
                if (impDS.Tables.Count > 0)
                {
                    impDT = impDS.Tables[0];
                }
                for (int i = 0; i < impDT.Rows.Count; i++)
                {
                    dynamicColumn += "{field:'" + "imp" + impDT.Rows[i]["sid"].ToString().Trim() + "',title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',width:80,rowspan:3,align:'center',halign: 'center'},";
                }

                string flow = "";
                DataTable tmpDT = new DataTable();
                DataSet tmpDS = new BLL.project_stage_work_flow_model().GetList(" s_sid='" + pssid + "'");
                if (tmpDS.Tables.Count > 0)
                {
                    tmpDT = tmpDS.Tables[0];
                }
                for (int i = 0; i < tmpDT.Rows.Count; i++)
                {
                    flow += (i + 1).ToString() + tmpDT.Rows[i]["work_flow_name"].ToString().Trim() + ",";
                }

                column += "[[";
                column += "{ title: '空间', field: 'contentName', width: 200, rowspan:3,halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}},";
                column += "{ title: '图纸及索引号', field: 'itemName', width: 200,rowspan:3, halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}},";
                column += "{ title: '月'},";
                column += "{ title: '(施工图立面框架"+flow+"(计划表中实际完成时间将用绿色色块做的标志))', field: 'tmp',width: 150,rowspan:3},";
                column += dynamicColumn;
                column += "{ title: '组长审核', field: 'v1', width: 60,rowspan:3, halign: 'center', align: 'center'},";
                column += "{ title: '未完成的原因', field: 'unfinished_reason', width: 60,rowspan:3, sortable: true, halign: 'center', align: 'center'},";
                column += "{ title: '解决的办法', field: 'solution', width: 60, rowspan:3,sortable: true, halign: 'center', align: 'center'},";
                column += "{ title: '解决的结果', field: 'reviewed', width: 60, rowspan:3,sortable: true, halign: 'center', align: 'center'},";
                column += "{ title: '总审', field: 'v2', width: 60, rowspan:3,sortable: true, halign: 'center', align: 'center'},";
                column += "{ title: '备注', field: 'remark', width: 60, rowspan:3,halign: 'center', editor: 'text',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}";
                column += "],";
                column += "[";
                column += "{ title: '日'}";
                column += "],[";
                column += "{ title: '星期', field: 'week',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';}}";
                column += "]]";
            }
        }
Beispiel #2
0
        private string ContentList(HttpContext context)
        {
            DataTable dt = new DataTable();

            //DataSet ds = new BLL.Common().GetList("select row_number()over (order by b.sequence) as rowid, a.sid,b.sid as csid,c.stage_name,d.group_name,b.name as contentName,a.name as itemName,a.unfinished_reason,a.solution,a.reviewed,a.remark,'' [week],'' tmp,a.v1,a.v2,a.sequence as itemSequence,b.sequence as contentSequence,b.remark as cremark,b.group_sid,a.parent_sid from project_specific_item_model b left outer join project_specific_item_model a on a.parent_sid=b.sid left outer join stage c on b.s_sid=c.sid left outer join project_stage_group_model d on b.group_sid=d.sid where b.s_sid=" + context.Request.Params["pssid"].Trim() + " and b.ischild=0 order by d.sequence asc, b.sequence asc, a.sequence asc");
            DataSet ds = new BLL.Common().GetList("select row_number()over (order by b.sequence) as rowid, a.sid,b.sid as csid,c.stage_name,d.group_name,b.name as contentName,a.name as itemName,a.unfinished_reason,a.solution,a.reviewed,a.remark,'' [week],'' tmp,a.v1,a.v2,a.sequence as itemSequence,b.sequence as contentSequence,b.remark as cremark,b.group_sid,a.parent_sid from project_specific_item_model b left outer join project_specific_item_model a on a.parent_sid=b.sid left outer join stage c on b.s_sid=c.sid left outer join project_stage_group_model d on b.group_sid=d.sid where b.s_sid=" + context.Request.Params["pssid"].Trim() + " and b.ischild=0 order by b.sequence asc, a.sequence asc");

            if (ds.Tables.Count > 0)
            {
                dt = ds.Tables[0];
            }
            if (dt.Rows.Count > 0)
            {
                DataTable impDT = new DataTable();
                DataSet   impDS = new BLL.project_stage_implement_model().GetList(" s_sid='" + context.Request.Params["pssid"].Trim() + "'");
                if (impDS.Tables.Count > 0)
                {
                    impDT = impDS.Tables[0];
                }
                for (int i = 0; i < impDT.Rows.Count; i++)
                {
                    DataColumn datetimeColumn = new DataColumn();
                    //该列的数据类型
                    datetimeColumn.DataType = System.Type.GetType("System.String");
                    //该列得名称
                    datetimeColumn.ColumnName = "imp" + impDT.Rows[i]["sid"].ToString().Trim();
                    //该列得默认值
                    datetimeColumn.DefaultValue = "";
                    dt.Columns.Add(datetimeColumn);

                    for (int j = 0; j < dt.Rows.Count; j++)
                    {
                        dt.Rows[j]["imp" + impDT.Rows[i]["sid"].ToString().Trim()] = "";
                    }
                }
            }

            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count));
        }