示例#1
0
    protected void DataBindToPage(string strWhere)
    {
        IntendanceMasterAction intendanceMasterAction = new IntendanceMasterAction();
        DataTable dataSource = new DataTable();

        strWhere = this.strUser;
        if (this.hdnflag.Value == "2" || this.hdnflag.Value == "3")
        {
            if (this.hdnflag.Value == "2")
            {
                int num = 2;
                if (this.ProjectCode == new Guid("00000000-0000-0000-0000-000000000000"))
                {
                    string sqlString = string.Concat(new object[]
                    {
                        "select a.*,b.v_xm,c.PrjName,c.PrjGuid ,d.CodeName from OPM_EPCM_IntendanceMaster as a inner join PT_yhmc as b on a.OpYhdm=b.v_yhdm inner join pt_prjinfo as c on a.PrjGuid=c.PrjGuid INNER JOIN dbo.XPM_Basic_CodeList as d ON a.QuestionTypeId = d.CodeID  where   d.TypeID = (select TypeId from XPM_Basic_CodeType WHERE SignCode='ProblemSupervise')",
                        strWhere,
                        " and a.settleState = ",
                        num,
                        "  order by a.BookInDate desc"
                    });
                    dataSource = publicDbOpClass.DataTableQuary(sqlString);
                }
                else
                {
                    dataSource = intendanceMasterAction.GetList(this.ProjectCode, strWhere);
                }
            }
            else
            {
                dataSource = intendanceMasterAction.GetList(this.ProjectCode, strWhere);
            }
        }
        else
        {
            dataSource = intendanceMasterAction.GetList(this.ProjectCode, strWhere);
        }
        this.grdModules.DataSource = dataSource;
        this.grdModules.DataBind();
    }