Beispiel #1
0
        /// <summary>
        ///
        /// 只显示已转换PDF的文件+文件登记的工程
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            string strWhere = " SingleProjectID=" + hid_SingleProjectID.Value + " AND BH not like '%S%' ";

            strWhere += " AND iSignaturePdf=1 ";//需要签章
            strWhere += " AND CONVERT_FLAG=1 AND exists (SELECT SingleProjectID FROM T_SingleProject where T_FileList.SingleProjectID=T_SingleProject.SingleProjectID and ";
            strWhere += " WorkFlow_DoStatus=" + DNTRequest.GetQueryString("WorkFlow_DoStatus") + ")";

            if (PublicModel.isSignatureCompany())
            {
                strWhere += "AND (IsFolder=0  AND OldRecID IN( ";
                strWhere += "SELECT b1.FileListID FROM T_FileList_SignatureTmp b1,(	";
                strWhere += "SELECT RoleCode from T_Role where RoleID=" + Common.Session.GetSession("RoleID") + " ) b2 WHERE b1.SignatureType=b2.RoleCode ))  ";
            }
            if (txtTitle.Text.Trim().Length > 0)
            {
                strWhere += " and Title like '%" + txtTitle.Text.Trim() + "%'";
            }
            if (txtWth.Text.Trim().Length > 0)
            {
                strWhere += " and w_t_h like '%" + txtWth.Text.Trim() + "%'";
            }

            if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
            {
                pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                ViewState["CurrentPageIndex"] = pageIndex;
            }
            else
            {
                pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
            }

            DataTable dt = fileBLL.GetLHSignatureFilesList(Common.Session.GetSession("UserID"), strWhere, pageSize, pageIndex, out itemCount);

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount      = itemCount;
            AspNetPager.CurrentPageIndex = pageIndex;

            gvData.DataSource = dt;
            gvData.DataBind();
        }