Exemplo n.º 1
0
        /// <summary>
        /// 绑定页面
        /// </summary>
        /// <param name="ID"></param>
        private void BindPage(string ID)
        {
            if (!String.IsNullOrWhiteSpace(ID))
            {
                Model.T_UsersInfo_MDL model = new DigiPower.Onlinecol.Standard.Model.T_UsersInfo_MDL();
                model = userBLL.GetModel(Convert.ToInt32(ID));
                if (model != null)
                {
                    ViewState["model"] = model;
                    object obj = DigiPower.Onlinecol.Standard.Web.Comm.SetValueToPage(model, this.tbl);
                    Passwd.Attributes("value", DESEncrypt.Decrypt(model.Passwd));

                    if (model.CompanyID > 0)
                    {
                        Model.T_Company_MDL companyMDL = new T_Company_BLL().GetModel(model.CompanyID);
                        if (companyMDL != null)
                        {
                            txtCompanyName.Text = companyMDL.CompanyName;
                        }
                    }
                    if (model.RoleID > 0)
                    {
                        Model.T_Role_MDL roleMDL = new T_Role_BLL().GetModel(model.RoleID);
                        if (roleMDL != null)
                        {
                            txtRoleName.Text = roleMDL.RoleName;
                        }
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(ChangePassword));
            if (Common.Session.GetSession("UserID") == "")
            {
                Response.Redirect("/UserLoginGather.aspx");
            }
            if (!this.IsPostBack)
            {
                T_UsersInfo_MDL userMDL = userinfoBLL.GetModel(ConvertEx.ToInt(Common.Session.GetSession("UserID")));
                if (userMDL != null)
                {
                    UserName.Text  = userMDL.UserName;
                    Mobile.Text    = userMDL.Mobile;
                    Fax.Text       = userMDL.Fax;
                    Tel.Text       = userMDL.Tel;
                    LoginName.Text = userMDL.LoginName;

                    if (!PublicModel.isSuperAdmin())
                    {
                        CompanyName.readOnly = true;
                    }

                    T_Company_MDL companyMDL = new T_Company_BLL().GetModel(userMDL.CompanyID);
                    if (companyMDL != null)
                    {
                        ViewState["companyMDL"] = companyMDL;
                        CompanyName.Text        = companyMDL.CompanyName;
                    }

                    ViewState["userMDL"] = userMDL;
                }
            }
        }
        public void SetCompanyType(int UnderMyParentID, int CompanyId, bool isshowjs = false)
        {
            CompanyType.DataBindEx(UnderMyParentID, isshowjs);
            T_Company_MDL mdl = new T_Company_MDL();

            if (CompanyId > 0)
            {
                BLL.T_Company_BLL bll = new T_Company_BLL();
                mdl = bll.GetModel(CompanyId);
                CompanyType.SystemInfoID = mdl.CompanyType.ToString();
            }
        }
        public T_Company_MDL GetModule(int tCompanyID)
        {
            T_Company_MDL mdl = new T_Company_MDL();

            if (tCompanyID > 0)
            {
                BLL.T_Company_BLL bll = new T_Company_BLL();
                mdl = bll.GetModel(tCompanyID);
            }
            object obj = Comm.GetValueToObject(mdl, tbl_company);

            return((T_Company_MDL)obj);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 绑定页面
        /// </summary>
        /// <param name="ID"></param>
        private void BindPage(string ID)
        {
            T_Role_MDL model = new T_Role_MDL();

            model = roleBLL.GetModel(Convert.ToInt32(ID));
            if (model != null)
            {
                ViewState["model"] = model;
                object obj = Comm.SetValueToPage(model, this.tbl);

                BLL.T_Company_BLL compBLL = new T_Company_BLL();
                T_Company_MDL     compMDL = compBLL.GetModel(model.CompanyID);
                if (compBLL != null)
                {
                    CTRL_AREA.SelectValue = compMDL.AREA_CODE;
                }

                CompanyID.SelectValue = model.CompanyID.ToString();
            }
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                SingleProjectID = Common.ConvertEx.ToInt(Common.DNTRequest.GetString("SingleProjectID"));
                T_SingleProject_BLL spBLL = new T_SingleProject_BLL();
                T_SingleProject_MDL spMDL = spBLL.GetModel(SingleProjectID);

                List <T_Company_MDL> ltCompany = new T_Company_BLL().GetModelList("CompanyID=(select CompanyID from T_Construction_Project where ConstructionProjectID=" + Common.ConvertEx.ToString(spMDL.ConstructionProjectID) + ")");
                Comm.SetValueToPage(spMDL, this.tbl);

                gczt.Text = PublicModel.getSingleProjectStatusNameByStatus(ConvertEx.ToInt(spMDL.Status));//工程状态
                if (ltCompany.Count > 0)
                {
                    companyName.Text       = ltCompany[0].CompanyName;                                  //单位名称
                    ChargeUserName.Text    = ltCompany[0].ChargeUserName;                               //项目负责人
                    ContactPerson_Tel.Text = ltCompany[0].ContactPerson + "(" + ltCompany[0].Tel + ")"; //联系人 ,联系电话
                }
                GetWorkFlowHtml(spMDL);
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 绑定归档目录
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID));

            if (spMDL != null)
            {
                projectType = spMDL.ProjectType;

                string strWhere = " SingleProjectID=" + singleProjectID;
                strWhere += " AND BH not like '%S%' ";                      //不显示声像节点

                if (PublicModel.isSuperAdmin() || !PublicModel.isCompany()) //Leo 超级管理员看全部
                {
                }
                else if (spMDL != null && spMDL.CompanyUserID == Common.ConvertEx.ToInt(Common.Session.GetSession("UserID")))    //Leo 工程管理员也看全部,档案馆的人也可以看全部
                {
                }
                else
                {
                    strWhere += " AND operateuserid=" + Common.Session.GetSession("UserID");
                }

                if (!String.IsNullOrWhiteSpace(txtMyCode.Text.Trim()))
                {
                    strWhere += " AND MyCode LIKE '%" + txtMyCode.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(txtTitle.Text.Trim()))
                {
                    strWhere += " AND TITLE LIKE '%" + txtTitle.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(rdbFileStatus.SelectValue) && rdbFileStatus.SelectValue != "0")
                {
                    strWhere += " AND Status=" + rdbFileStatus.SelectValue;
                }
                if (!String.IsNullOrWhiteSpace(ddlCompany.SelectValue) && ddlCompany.SelectValue != "0")
                {
                    T_Company_BLL compBLL = new T_Company_BLL();
                    T_Company_MDL compMDL = compBLL.GetModel(ConvertEx.ToInt(ddlCompany.SelectValue));
                    if (compMDL != null)
                    {
                        strWhere += " AND DefaultCompanyType=" + compMDL.CompanyType + "";
                    }
                }
                if (!String.IsNullOrWhiteSpace(ddlFileType.SelectValue) && ddlFileType.SelectValue != "0")
                {
                    strWhere += " AND BH like '" + ddlFileType.SelectValue + "%' ";
                }
                if (!String.IsNullOrWhiteSpace(ddlChangeFile.SelectedValue))
                {
                    var changeFile = ddlChangeFile.SelectedValue;
                    if (changeFile == "1")  //有变更
                    {
                        strWhere += " AND ISNULL(version,0)=(SELECT TOP 1 ISNULL(f.RollBackCount,0)from T_WorkFlowDefine f where f.SingleProjectID=" + singleProjectID + " ";
                        strWhere += "AND f.WorkFlowID=" + PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString()) + ") ";
                    }
                    if (changeFile == "0")  //无变更
                    {
                        strWhere += " AND ISNULL(version,0) !=(SELECT TOP 1 ISNULL(f.RollBackCount,0)from T_WorkFlowDefine f where f.SingleProjectID=" + singleProjectID + " ";
                        strWhere += "AND f.WorkFlowID=" + PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString()) + ") ";
                    }
                }

                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 = fileListBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);

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

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

                rpData.DataSource = dt;
                rpData.DataBind();
            }
        }
Exemplo n.º 8
0
        private string InsertFileList(XmlNode xmlNode)
        {
            string rtMsg = string.Empty;

            try {
                #region 新增文件信息
                T_FileList_MDL fileMDL         = new T_FileList_MDL();
                string         singleProjectID = xmlNode["SINGLEPROJECTID"].InnerText;           //工程ID
                string         operateUserID   = xmlNode["OPERATEUSERID"].InnerText;             //当前用户ID
                string         pid             = xmlNode["PID"].InnerText;                       //文件所属类别ID

                pid = GetFilePID(pid, xmlNode["FROMRECID"].InnerText, xmlNode["FROMTYPE"].InnerText);
                if (ConvertEx.ToInt(pid) < 1)
                {
                    rtMsg = "传入的PID匹配失败!";
                    return(rtMsg);
                }

                T_UsersInfo_MDL userMDL = new T_UsersInfo_BLL().GetModel(ConvertEx.ToInt(operateUserID));
                if (userMDL != null)
                {
                    fileMDL.OperateUserID = userMDL.UserID;
                    fileMDL.CompanyID     = userMDL.CompanyID;
                    T_Company_MDL companyMDL = new T_Company_BLL().GetModel(userMDL.CompanyID);
                    if (companyMDL != null)
                    {
                        fileMDL.DefaultCompanyType = companyMDL.CompanyType;
                    }
                }

                //记录文件在模板中对应的recid
                fileMDL.OldRecID = ConvertEx.ToInt(fileBLL.GetRecID(xmlNode["FROMRECID"].InnerText, xmlNode["FROMTYPE"].InnerText));
                fileMDL.recID    = fileBLL.GetMaxRecID(singleProjectID);
                fileMDL.PID      = ConvertEx.ToInt(pid);
                fileMDL.IsFolder = false;

                IList <T_FileList_MDL> ltMDL = fileBLL.GetModelList("SingleProjectID=" + singleProjectID + " and recid=" + pid + "");
                if (ltMDL != null && ltMDL.Count > 0)
                {
                    fileMDL.BH = new T_Other_BLL().GetBH(singleProjectID, ltMDL[0].FileListID.ToString());
                }

                fileMDL.PagesCount  = ConvertEx.ToInt(xmlNode["PDFCOUNT"].InnerText);                       //PDF页数
                fileMDL.ManualCount = ConvertEx.ToInt(xmlNode["PDFCOUNT"].InnerText);                       //实体页数

                fileMDL.shr_3           = "0";
                fileMDL.w_t_h           = xmlNode["FILEID"].InnerText;
                fileMDL.SingleProjectID = ConvertEx.ToInt(xmlNode["SINGLEPROJECTID"].InnerText);
                fileMDL.zrr             = xmlNode["ZRR"].InnerText;
                fileMDL.Title           = xmlNode["TITLE"].InnerText;
                fileMDL.CreateDate      = DateTime.Now;                                                 //文件登记时间
                fileMDL.StartTime       = xmlNode["START_DATE"].InnerText;
                fileMDL.CONVERT_DT      = DateTime.Now.ToString("yyyy-MM-dd");                          // xmlNode["START_DATE"].InnerText;
                fileMDL.CONVERT_FLAG    = true;
                fileMDL.PDFFilePath     = xmlNode["PDFFILEPATH"].InnerText;                             //合并的PDF文件名称
                fileMDL.RootPath        = Common.Common.EFileStartPath;                                 //PDF存放路径
                fileMDL.FROM_SID        = xmlNode["SID"].InnerText;                                     //筑业过来的文件SID,二次导入时据此判断
                fileMDL.IsMerge         = xmlNode["IsMerge"].InnerText;                                 //合并后的PDF,还是单张表格的PDF
                fileMDL.Status          = "10";                                                         //已登记
                fileMDL.OldStatus       = "10";
                fileMDL.SIGNATURE_FLAG  = false;                                                        //导入不能为已签章@tyy20160326
                int fileListID = fileBLL.Add(fileMDL);
                #endregion

                #region 关联文件对应的附件信息,先删除后添加
                T_EFile_OutSideRelated_BLL efileOutSideRelatedBLL = new T_EFile_OutSideRelated_BLL();
                efileOutSideRelatedBLL.DelEfileOutSideRelated(fileListID.ToString(), xmlNode["FROMTYPE"].InnerText);
                if (!string.IsNullOrWhiteSpace(xmlNode["EFILE_OUTSIDERELATED"].InnerText))
                {
                    string[] spEfileOutSideRelated = (xmlNode["EFILE_OUTSIDERELATED"].InnerText + ",").Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                    foreach (var fromID in spEfileOutSideRelated)
                    {
                        T_EFile_OutSideRelated_MDL efileOutSideRelatedMDL = new T_EFile_OutSideRelated_MDL();
                        efileOutSideRelatedMDL.FileListID = fileListID.ToString();
                        efileOutSideRelatedMDL.FromID     = fromID;
                        efileOutSideRelatedMDL.FromType   = xmlNode["FROMTYPE"].InnerText;
                        efileOutSideRelatedBLL.Add(efileOutSideRelatedMDL);
                    }
                }
                #endregion

                rtMsg = SystemSet._RETURN_SUCCESS_VALUE;
            } catch (Exception ex) {
                rtMsg = "failure:" + ex.Message;
            }
            return(rtMsg);
        }
Exemplo n.º 9
0
        /// <summary>
        /// 将Model值赋给控件
        /// </summary>
        /// <param name="tSingleProjectID">工程ID</param>
        public void DataBindEx(int tSingleProjectID)
        {
            CTRL_AREA.BindDdlArea(true);
            ProjectType.DataBindEx();

            if (tSingleProjectID > 0)
            {
                T_SingleProject_MDL spMdl = new T_SingleProject_BLL().GetModel(tSingleProjectID); //获取工程Model
                Comm.SetValueToPage(spMdl, tablemain);                                            //将Model值赋给控件
                int ConstructionProjectID = Common.ConvertEx.ToInt(spMdl.ConstructionProjectID);  //获取项目ID
                gcdd.Text = spMdl.gcqy + spMdl.gcdd;

                if (ConstructionProjectID > 0)
                {
                    T_Construction_Project_MDL cpMdl = new T_Construction_Project_BLL().GetModel(ConstructionProjectID);
                    if (cpMdl != null)
                    {
                        int CompanyID = Common.ConvertEx.ToInt(cpMdl.CompanyID);                        //通过项目获取单位ID
                        if (CompanyID > 0)
                        {
                            T_Company_MDL cMdl = new T_Company_BLL().GetModel(CompanyID);
                            Comm.SetValueToPage(cMdl, table_Company);
                        }
                    }

                    StringBuilder ghxkz = new StringBuilder();
                    StringBuilder sgxkz = new StringBuilder();
                    StringBuilder other = new StringBuilder();

                    //获取工程对应的所有上传证件的附件
                    List <T_FileAttach_MDL> lt_ftMdl = new T_FileAttach_BLL().GetModelList("PriKeyValue=" + tSingleProjectID.ToString());
                    foreach (T_FileAttach_MDL ftMdl in lt_ftMdl)
                    {
                        if (ftMdl.AttachCode == "ghxkz")
                        {
                            ghxkz.Append("&nbsp;&nbsp;<a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a>&nbsp;");
                        }
                        else if (ftMdl.AttachCode == "sgxkz")
                        {
                            sgxkz.Append("&nbsp;&nbsp;<a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a>&nbsp;");
                        }
                        else if (ftMdl.AttachCode == "other")
                        {
                            other.Append("&nbsp;&nbsp;<a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a>&nbsp;");
                        }
                    }
                    if (ghxkz.Length > 0)
                    {
                        ltghxkz.Text = ghxkz.ToString();
                    }
                    if (sgxkz.Length > 0)
                    {
                        ltsgxkz.Text = sgxkz.ToString();
                    }
                    if (other.Length > 0)
                    {
                        ltother.Text = other.ToString();
                    }
                }
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string getUserInfo(HttpContext context)
        {
            try {
                if (context.Request.Form["username"] == null || context.Request.Form["password"] == null)
                {
                    return("账号或密码为空!");
                }

                T_UsersInfo_BLL userinfobll = new T_UsersInfo_BLL();

                string strPrivateKey = string.Empty;
                using (StreamReader reader = new StreamReader(context.Server.MapPath("/RsaKey/PrivateKey.xml"))) {
                    strPrivateKey = reader.ReadToEnd();
                }

                RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
                rsa.FromXmlString(strPrivateKey);

                byte[] result = rsa.Decrypt(UserLoginGather.HexStringToBytes(context.Request.Form["password"]), false);
                System.Text.ASCIIEncoding enc = new ASCIIEncoding();
                string rsaPwd = enc.GetString(result);

                string loginString = "UPPER(loginname)='" + Common.Common.SqlSafe(context.Request.Form["username"]).ToUpper()
                                     + "' and passwd='" + DESEncrypt.Encrypt(rsaPwd) + "' ";

                List <T_UsersInfo_MDL> userinfomdl = userinfobll.GetModelList(loginString);
                if (userinfomdl.Count > 0)
                {
                    if (userinfomdl[0].IsValid == true)
                    {
                        T_Company_BLL compBLL = new T_Company_BLL();
                        T_Company_MDL compMDL = compBLL.GetModel(userinfomdl[0].CompanyID);
                        if (compMDL != null)
                        {
                            context.Session["IsCompany"]     = compMDL.IsCompany.ToString().ToLower();
                            context.Session["CompanyName"]   = compMDL.CompanyName;
                            context.Session["OLD_AREA_CODE"] = compMDL.AREA_CODE;
                            context.Session["AREA_CODE"]     = "";
                            if (compMDL.IsCompany.ToString().ToLower() == "false")     //只有档案馆,需要区域信息,建设单位等都不要过虑
                            {
                                string myArea_Code    = compMDL.AREA_CODE;
                                string myArea_CodeNew = compMDL.AREA_CODE;
                                for (int i1 = myArea_Code.Length - 1; i1 > 0; i1--)
                                {
                                    if (myArea_Code[i1].ToString() == "0")
                                    {
                                        myArea_CodeNew = myArea_Code.Substring(0, i1);
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                                context.Session["AREA_CODE"] = myArea_CodeNew;
                            }
                            context.Session["CompanyType"] = compMDL.CompanyType;
                        }
                        else
                        {
                            return(SystemSet._RETURN_FAILURE_VALUE + ":单位信息不存在!");
                        }

                        BLL.T_SystemInfo_BLL   systemInfoBLL = new T_SystemInfo_BLL();
                        Model.T_SystemInfo_MDL systemInfoMDL = systemInfoBLL.GetModel(compMDL.CompanyType);
                        if (systemInfoMDL == null)
                        {
                            return(SystemSet._RETURN_FAILURE_VALUE + ":单位类型字典不存在!");
                        }

                        context.Session["CompanyTypeName"] = systemInfoMDL.SystemInfoName;
                        context.Session["CompanyTypeCode"] = systemInfoMDL.SystemInfoCode;
                        context.Session["SystemInfoID"]    = systemInfoMDL.SystemInfoID;
                        context.Session["MyParentID"]      = systemInfoMDL.ParentID;

                        context.Session["UserID"]       = userinfomdl[0].UserID;
                        context.Session["LoginName"]    = userinfomdl[0].LoginName;
                        context.Session["UserName"]     = userinfomdl[0].UserName;
                        context.Session["RoleID"]       = userinfomdl[0].RoleID;
                        context.Session["CompanyID"]    = userinfomdl[0].CompanyID;
                        context.Session["IsLeader"]     = userinfomdl[0].IsLeader;
                        context.Session["SuperAdmin"]   = userinfomdl[0].IsSuperAdmin;
                        context.Session["OwnerFileTmp"] = userinfomdl[0].OwnerFileTmp;         //外协单位用户

                        T_Role_MDL roleMDL = new T_Role_BLL().GetModel(userinfomdl[0].RoleID); //签章用
                        if (roleMDL != null)
                        {
                            context.Session["RoleName"] = roleMDL.RoleName;
                            context.Session["RoleCode"] = roleMDL.RoleCode;
                        }

                        TimeSpan ts      = new TimeSpan(8760, 0, 0);
                        DateTime expired = DateTime.Today.Add(ts);
                        HttpContext.Current.Response.Cookies["LoginName"].Value   = context.Server.UrlEncode(userinfomdl[0].LoginName);
                        HttpContext.Current.Response.Cookies["LoginName"].Expires = expired;

                        //修改最后登录时间
                        userinfomdl[0].LastLoginTime = DateTime.Now;
                        userinfobll.Update(userinfomdl[0]);

                        PublicModel.writeLog(SystemSet.EumLogType.LogIn.ToString(), ";用户登录系统");
                        return(SystemSet._RETURN_SUCCESS_VALUE);
                    }
                    else
                    {
                        return("如果您已经成功注册,请等待确认后再登录!");
                    }
                }
                else
                {
                    return("用户账号或密码错误!");
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "用户登录BUG", ex);
                return("系统异常,请稍后再试");
            }
        }
Exemplo n.º 11
0
        //绑定归档目录
        private void BindGridView(int pageIndex)
        {
            T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID));

            if (spMDL != null)
            {
                singleProjectNo = spMDL.gcbm;
                projecttype     = spMDL.ProjectType;

                //取当前工程的所有归档目录
                string strWhere = " SingleProjectID=" + singleProjectID;

                //不显示声像节点 //jdk 2014.11.16
                strWhere += " AND BH not like '%S%' ";

                if (PublicModel.isCompany() && !PublicModel.isLeader())   //监理或施工只能看到自己的
                {
                    strWhere += " and operateuserid=" + Common.Session.GetSession("UserID");
                }

                if (ConvertEx.ToBool(SystemSet._ISIGNATUREPDF))
                {
                    if (!string.IsNullOrWhiteSpace(ddliSignaturePdf.SelectedValue))
                    {
                        strWhere += " AND iSignaturePdf=" + ddliSignaturePdf.SelectedValue + "";   //是否需要签章
                    }
                    if (!string.IsNullOrWhiteSpace(ddlSignatureFinishFlag.SelectedValue))          //签章完成状态
                    {
                        string tempStrWhere        = " and iSignaturePdf=1 and IsFolder=0 and (SELECT COUNT(1) from T_FileList_SignatureTmp f1 where f1.FileListID=T_FileList.OldRecID)>0 ";
                        int    signatureFinishFlag = ConvertEx.ToInt(ddlSignatureFinishFlag.SelectedValue); //签章是否完成标记 那已签章完成的记录跟需要签章的记录比对.
                        if (signatureFinishFlag == 1)                                                       //签章完成
                        {
                            tempStrWhere += "and (SELECT COUNT(1) from T_FileList_SignatureLog f0 where f0.FileListID=T_FileList.FileListID and f0.SignatureFinishFlag=1)";
                            tempStrWhere += ">=(SELECT COUNT(1) from T_FileList_SignatureTmp f1 where f1.FileListID=T_FileList.OldRecID) ";
                            strWhere     += tempStrWhere;
                        }
                        else if (signatureFinishFlag == 0)    //签章未完成
                        {
                            tempStrWhere += "and (SELECT COUNT(1) from T_FileList_SignatureLog f0 where f0.FileListID=T_FileList.FileListID and f0.SignatureFinishFlag=1)";
                            tempStrWhere += "<(SELECT COUNT(1) from T_FileList_SignatureTmp f1 where f1.FileListID=T_FileList.OldRecID) ";
                            strWhere     += tempStrWhere;
                        }
                    }
                }

                if (!String.IsNullOrWhiteSpace(txtMyCode.Text.Trim()))
                {
                    strWhere += " AND MyCode LIKE '%" + txtMyCode.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(txtTitle.Text.Trim()))
                {
                    strWhere += " AND TITLE LIKE '%" + txtTitle.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(rdbFileStatus.SelectValue) && rdbFileStatus.SelectValue != "0")
                {
                    strWhere += " AND Status=" + rdbFileStatus.SelectValue;
                }
                if (!String.IsNullOrWhiteSpace(ddlCompany.SelectValue) && ddlCompany.SelectValue != "0")
                {
                    T_Company_BLL compBLL = new T_Company_BLL();
                    T_Company_MDL compMDL = compBLL.GetModel(ConvertEx.ToInt(ddlCompany.SelectValue));
                    if (compMDL != null)
                    {
                        strWhere += " AND DefaultCompanyType=" + compMDL.CompanyType + "";
                    }
                }
                if (!String.IsNullOrWhiteSpace(ddlFileType.SelectValue) && ddlFileType.SelectValue != "0")
                {
                    strWhere += " AND BH like '" + ddlFileType.SelectValue + "%' ";
                }

                Session["FileInfostrWhere"] = strWhere;

                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 = fileListBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;
                AspNetPager.AlwaysShow = true;
                AspNetPager.PageSize   = pageSize;

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

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