/// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="pageIndex"></param>
        public void BindGrid(int pageIndex)
        {
            //从窗口接收开始,都是馆里人员操作,不用考虑建设单位等身份
            string strWhere = " AND A.SingleProjectID=" + Common.DNTRequest.GetQueryString("SingleProjectID");

            if (PublicModel.isSuperAdmin())
            {//管理员管理员获取所有工程
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'";
            }
            else if (PublicModel.isArchiveUser())
            {//档案馆用户看自己的
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'";
            }

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

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        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;
                }
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(RoleAdd));
            MyAddInit();
            CTRL_AREA.MySelectChange += new DigiPower.Onlinecol.Standard.Web.CommonCtrl.ctrlDropDownArea.SelectChange(CompanySelectChange);
            if (!this.IsPostBack)
            {
                RoleType.DataValueField = "SystemInfoCode";
                RoleType.DataBindEx();

                if (PublicModel.isSuperAdmin())
                {
                    CTRL_AREA.BindDblArea(true, "");
                }
                else
                {
                    CTRL_AREA.BindDblArea(true, "AREA_CODE='" + Common.Session.GetSession("AREA_CODE") + "'");
                }

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW)
                {
                    btnSave.Visible = false;
                }

                CompanySelectChange();
                BindPage(ID);
            }
        }
Beispiel #4
0
        /// <summary>
        /// 列表数据绑定
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            string sqlWhere = " b.CompanyType !=" + SystemSet._ARCHIVE;

            if (!String.IsNullOrWhiteSpace(txtLoginName.Text.Trim()))
            {
                sqlWhere += " And a.LoginName like '%" + txtLoginName.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtUserName.Text.Trim()))
            {
                sqlWhere += " And a.UserName like '%" + txtUserName.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtCompanyName.Text.Trim()))
            {
                sqlWhere += " And b.CompanyName like '%" + txtCompanyName.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtGcmc.Text.Trim()))
            {
                sqlWhere += " And d.gcmc like '%" + txtGcmc.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtGcdd.Text.Trim()))
            {
                sqlWhere += " And d.gcdd like '%" + txtGcdd.Text.Trim() + "%' ";
            }
            if (ddlUserType.SelectedValue != "0")
            {
                sqlWhere += " And lower(a.UserType)='" + ddlUserType.SelectedValue.Trim().ToLower() + "' ";
            }

            if (PublicModel.isSuperAdmin())  //超级管理员
            {
                sqlWhere += " And b.Area_Code like '" + Common.Session.GetSession("OLD_AREA_CODE") + "%' ";
            }
            else if (PublicModel.isArchiveUser())   //馆里用户
            {
                sqlWhere += " And b.Area_Code like '" + Common.Session.GetSession("AREA_CODE") + "%' ";
            }

            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 = userBLL.GetCompanyUserList(sqlWhere, pageSize, pageIndex, out itemCount);

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="pageIndex"></param>
        public void BindGrid(int pageIndex)
        {
            //工程状态必须走到了 整理接收 且没有入库 !=3722 才可以做补卷管理
            string strWhere = " AND D.WorkFlow_DoStatus >=(select WorkFlowID from T_WorkFlow where LOWER(WorkFlowCode)='" +
                              SystemSet.EumWorkFlowCode.WINRECV.ToString().ToLower() + "') and  d.Status!=3722 ";

            if (PublicModel.isSuperAdmin())  //管理员管理员获取所有工程
            {
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'";
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'";
            }
            else
            {
                if (PublicModel.isLeader())     //建设单位只看到自己
                {
                    strWhere += " AND A.SingleProjectID in (select SingleProjectID from T_SingleProject  A,(select distinct ConstructionProjectID from T_Construction_Project ";
                    strWhere += " where CompanyID=" + Common.Session.GetSession("CompanyID") + ") B where A.ConstructionProjectID=B.ConstructionProjectID)";
                }
            }

            if (txtgcmc.Text.Trim().Length > 0)
            {
                strWhere += " AND D.gcmc LIKE '%" + txtgcmc.Text.Trim() + "%'";
            }
            if (txtgcbm.Text.Trim().Length > 0)
            {
                strWhere += " AND D.gcbm LIKE '%" + txtgcbm.Text + "%'";
            }
            if (txtajtm.Text.Trim().Length > 0)
            {
                strWhere += " AND A.ajtm like '%" + txtajtm.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 = archiveBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        protected void BindGrid(int pageIndex)
        {
            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"]);
            }

            Hashtable ht = new Hashtable();

            ht.Add("CompanyType", DNTRequest.GetQueryString("CompanyType"));
            if (txtCompanyName.Text.Trim().Length > 0)
            {
                ht.Add("CompanyName", txtCompanyName.Text.Trim());
            }

            if (PublicModel.isSuperAdmin())   //超级管理员
            {
                ht.Add("Area_Code", Common.Session.GetSession("AREA_CODE"));
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                ht.Add("Area_Code", Common.Session.GetSession("OLD_AREA_CODE"));
            }
            else if (PublicModel.isLeader())      //建设单位
            {
                ht.Add("Area_Code", Common.Session.GetSession("OLD_AREA_CODE"));
                if (DNTRequest.GetQueryInt("CompanyType", 0) == SystemSet._JSCOMPANYINFO)
                {
                    ht.Add("CompanyID", Common.Session.GetSession("CompanyID"));
                }
            }
            else
            {
                ht.Add("CompanyID", Common.Session.GetSession("CompanyID"));
            }

            DataTable dt = compBLL.GetListPaging(ht, pageSize, pageIndex, out itemCount);

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="pageIndex"></param>
        public void BindGrid(int pageIndex)
        {
            //从窗口接收开始,都是馆里人员操作,不用考虑建设单位等身份
            string strWhere = " AND A.SingleProjectID=" + Common.DNTRequest.GetQueryString("SingleProjectID");

            if (PublicModel.isSuperAdmin())  //管理员管理员获取所有工程
            {
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'";
            }
            else if (PublicModel.isArchiveUser())  //档案馆用户看自己的
            {
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'";
            }

            Hashtable ht = new Hashtable();

            if (ddlChkStatus.SelectedValue != "")     //关于审核状态,都是查询最后一次的审核信息
            {
                ht.Add("CheckStatus", ddlChkStatus.SelectedValue);
                ht.Add("SingleProjectID", singleProjectID);
                ht.Add("WorkFlowID", workFlowID);
            }
            if (txtXH.Text != "")
            {
                strWhere += " AND XH=" + ConvertEx.ToInt(txtXH.Text.Trim()) + "";
            }
            if (txtTitle.Text.Trim().Length > 0)
            {
                strWhere += " AND A.ajtm like '%" + txtTitle.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 = trBll.GetListPaging(strWhere, pageSize, pageIndex, out itemCount, ht);;

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <summary>
        /// 绑定列表
        /// </summary>
        private void BindGridView(int pageIndex)
        {
            Hashtable ht = new Hashtable();

            ht.Add("CodeType", SystemSet.EumReportType.ZRS.ToString());
            if (PublicModel.isSuperAdmin())  //超级管理员
            {
                ht.Add("AREA_CODE", Common.Session.GetSession("AREA_CODE"));
            }
            if (PublicModel.isArchiveUser()) //档案馆用户看自己的
            {
                ht.Add("OLD_AREA_CODE", Common.Session.GetSession("OLD_AREA_CODE"));
            }
            if (!String.IsNullOrWhiteSpace(txtReadyCheckBookCode.Text.Trim()))
            {
                ht.Add("ReadyCheckBookCode", txtReadyCheckBookCode.Text.Trim());
            }
            if (!String.IsNullOrWhiteSpace(txtGcmc.Text.Trim()))
            {
                ht.Add("gcmc", txtGcmc.Text.Trim());
            }
            if (!String.IsNullOrWhiteSpace(txtGcbm.Text.Trim()))
            {
                ht.Add("gcbm", txtGcbm.Text.Trim());
            }
            if (ddlProjectType.SelectValue != "" && ddlProjectType.SelectValue != "0")
            {
                ht.Add("ProjectType", ddlProjectType.SelectValue);
            }
            if (ddlReadyCheckBookType.SelectedValue == "1") //已发放
            {
                ht.Add("ReadyCheckBookTypeFlag", 1);
            }
            if (ddlReadyCheckBookType.SelectedValue == "0")  //未发放
            {
                ht.Add("ReadyCheckBookTypeFlag", 0);
            }
            Session["ZRS_HtStrWhere"] = ht;
            DataTable dt = readBLL.GetListPaging(ht, pageSize, pageIndex, out itemCount);

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <summary>
        /// 绑定列表
        /// </summary>
        private void BindGridView(int pageIndex)
        {
            string sqlWhere = " b.CompanyType=" + SystemSet._ARCHIVE;

            if (PublicModel.isSuperAdmin())
            {
                sqlWhere += " And b.Area_Code like '%" + Common.Session.GetSession("OLD_AREA_CODE") + "%'";
            }
            if (PublicModel.isArchiveUser())
            {
                sqlWhere += " And b.Area_Code like '%" + Common.Session.GetSession("AREA_CODE") + "%'";
            }
            if (!String.IsNullOrWhiteSpace(ddlCompany.SelectValue))
            {
                sqlWhere += " And a.CompanyID=" + ddlCompany.SelectValue + "";
            }
            if (!String.IsNullOrWhiteSpace(txtRoleName.Text.Trim()))
            {
                sqlWhere += " And a.RoleName like '%" + txtRoleName.Text.Trim() + "%'";
            }
            if (!String.IsNullOrWhiteSpace(ddlRoleType.SelectValue))
            {
                sqlWhere += " And lower(a.RoleType)  like '%" + ddlRoleType.SelectValue.ToLower() + "%'";
            }

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

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
Beispiel #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(OutHelpCompanyAdd));
            MyAddInit();
            txtFileList.Attributes("onkeydown", "return false");

            if (!this.IsPostBack)
            {
                ctrlOutHelpRole.DataBindEx(null, SystemSet._OUTHELP_ROLETYPE);

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW)
                {
                    btnSave.Visible         = false;
                    ctrlOutHelpRole.Enabled = false;
                }

                ctrlCompanyBaseInfo1.DataBindEx(ConvertEx.ToInt(ID));
                ctrlCompanyBaseInfo1.SetCompanyTypeEnable(false);
                ctrlCompanyBaseInfo1.CompanyTypeID = CompanyType;
                ctrlCompanyBaseInfo1.SetAreaCodeEnable(false);

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.EDIT)
                {
                    ctrlOutHelpRole.Enabled = false;
                    if (PublicModel.isSuperAdmin())
                    {
                        ctrlOutHelpRole.Enabled = true;
                    }

                    List <T_UsersInfo_MDL> ltUserInfo = new T_UsersInfo_BLL().GetModelList("CompanyID=" + ID);
                    if (ltUserInfo.Count > 0)
                    {
                        HidUserID.Value             = ConvertEx.ToString(ltUserInfo[0].UserID);
                        txtLogName.Text             = ltUserInfo[0].LoginName;
                        txtLogName.enabled          = false;
                        ctrlOutHelpRole.SelectValue = ltUserInfo[0].RoleID.ToString();
                        txtPwd.Attributes("value", DESEncrypt.Decrypt(ltUserInfo[0].Passwd));
                        txtPwd2.Attributes("value", DESEncrypt.Decrypt(ltUserInfo[0].Passwd));
                        txtFileList.Attributes("value", ltUserInfo[0].OwnerFileTmp);
                        ViewState["UserID"] = ConvertEx.ToString(ltUserInfo[0].UserID);
                    }
                }
            }
        }
Beispiel #11
0
        /// <summary>
        /// 绑定
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGrid(int pageIndex)
        {
            DataTable dt = new DataTable();

            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"]);
            }

            if (PublicModel.isSuperAdmin())
            {
                string _where = "";
                if (txtXMMC.Text.Trim().Length > 0)
                {
                    _where += "AND A.xmmc like '%" + txtXMMC.Text.Trim() + "%'";
                }
                dt = bll1.GetListPaging("", "", "", pageSize, pageIndex, out itemCount, _where);
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                dt = bll1.GetListPaging("", "", Common.Session.GetSession("OLD_AREA_CODE"), pageSize, pageIndex, out itemCount);
            }
            else     //其他人只能看自己的
            {
                dt = bll1.GetListPaging(Common.Session.GetSession("CompanyID"), Common.Session.GetSession("RoleID"), pageSize, pageIndex, out itemCount);
            }

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
Beispiel #12
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            StringBuilder strWhere = new StringBuilder();

            strWhere.Append(" 1=1 AND Status>=3721 AND WorkFlow_DoStatus=" + ViewState["workFlowID"].ToString());
            strWhere.Append(" AND ProjectType in (select SystemInfoCode from T_SystemInfo where SystemInfoID in(" + ProjectType + ")) ");

            if (kgsj1.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND kgsj>='" + kgsj1.Text.Trim() + " 00:00:00.00 ' ");
            }
            if (kgsj2.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND kgsj<='" + kgsj2.Text.Trim() + " 23:59:59.99' ");
            }
            if (jgsj1.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND jgsj>='" + jgsj1.Text.Trim() + " 00:00:00.00 ' ");
            }
            if (jgsj2.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND jgsj<='" + jgsj2.Text.Trim() + " 23:59:59.99' ");
            }
            if (txtGcbm.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND gcbm like '%" + txtGcbm.Text.Trim() + "%' ");
            }
            if (txtGcmc.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND gcmc like '%" + txtGcmc.Text.Trim() + "%' ");
            }
            if (txtGcdd.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND gcdd like '%" + txtGcdd.Text.Trim() + "%' ");
            }
            if (txtghxkzh.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND ghxkzh like '%" + txtghxkzh.Text.Trim() + "%' ");
            }
            if (txtsgxkzh.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND sgxkzh like '%" + txtsgxkzh.Text.Trim() + "%' ");
            }
            if (ddlChargeUserID.SelectValue != "" && ddlChargeUserID.SelectValue != "0")
            {
                strWhere.Append(" AND ChargeUserID= " + ddlChargeUserID.SelectValue);
            }

            if (PublicModel.isSuperAdmin())  //超级管理员
            {
                strWhere.Append(" AND Area_Code like '" + ConvertEx.ToString(Session["AREA_CODE"]) + "%'");
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                strWhere.Append(" AND Area_Code like '" + ConvertEx.ToString(Session["OLD_AREA_CODE"]) + "%'");
            }
            else if (PublicModel.isLeader())    //工程管理员(建设单位)也看全部
            {
                strWhere.Append(" AND ConstructionProjectID in (select ConstructionProjectID from T_Construction_Project where CompanyID=" + Common.Session.GetSession("CompanyID") + ")");
            }

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

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
Beispiel #13
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            StringBuilder strWhere = new StringBuilder();

            strWhere.Append(" 1=1 ");
            string CompanyID = "";

            //只显示文件登记环节的工程  ,暂时未考虑多机构的问题
            strWhere.Append(" AND d.WorkFlowID=" + PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString()));

            if (ddlProjectType.SelectValue != "" && ddlProjectType.SelectValue != "0")
            {
                strWhere.Append(" AND a.ProjectType=(select SystemInfoCode from T_SystemInfo where SystemInfoID=" + ddlProjectType.SelectValue + ") ");
            }
            if (kgsj1.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.kgsj>='" + kgsj1.Text.Trim() + " 00:00:00.00 ' ");
            }
            if (kgsj2.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.kgsj<='" + kgsj2.Text.Trim() + " 23:59:59.99' ");
            }
            if (jgsj1.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.jgsj>='" + jgsj1.Text.Trim() + " 00:00:00.00 ' ");
            }
            if (jgsj2.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.jgsj<='" + jgsj2.Text.Trim() + " 23:59:59.99' ");
            }
            if (txtGcbm.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.gcbm like '%" + txtGcbm.Text.Trim() + "%' ");
            }
            if (txtGcmc.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.gcmc like '%" + txtGcmc.Text.Trim() + "%' ");
            }
            if (txtGcdd.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.gcdd like '%" + txtGcdd.Text.Trim() + "%' ");
            }
            if (txtghxkzh.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.ghxkzh like '%" + txtghxkzh.Text.Trim() + "%' ");
            }
            if (txtsgxkzh.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.sgxkzh like '%" + txtsgxkzh.Text.Trim() + "%' ");
            }
            if (ddlChargeUserID.SelectValue != "" && ddlChargeUserID.SelectValue != "0")
            {
                strWhere.Append(" AND a.ChargeUserID= " + ddlChargeUserID.SelectValue);
            }

            if (PublicModel.isSuperAdmin())  //超级管理员
            {
                CompanyID = "0";
                strWhere.Append(" and a.Area_Code like '" + ConvertEx.ToString(Session["AREA_CODE"]) + "%'");
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                CompanyID = "0";
                strWhere.Append(" and a.Area_Code like '" + ConvertEx.ToString(Session["OLD_AREA_CODE"]) + "%'");
            }
            else
            {
                if (Common.Session.GetSessionInt("CompanyType") == SystemSet._JSCOMPANYINFO)  //其他人只能看自己的
                {
                    CompanyID = Common.Session.GetSession("CompanyId");
                }
                else
                {
                    CompanyID = "0";
                    strWhere.Append(" AND EXISTS(select SingleProjectID from T_SingleProjectCompany where ");
                    strWhere.Append("CompanyID=" + Common.Session.GetSession("CompanyId") + " AND SingleProjectID=a.SingleProjectID )");
                }
            }

            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 = singleProjectBLL.GetListPaging(ConvertEx.ToInt(CompanyID), strWhere.ToString(), pageSize, pageIndex, out itemCount);;

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <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();
            }
        }
        private void BindGridView(int pageIndex)
        {
            Hashtable ht = new Hashtable();

            ht.Add("NotInCompanyType", string.Concat(SystemSet._ARCHIVE, ",", SystemSet._SIGNATURECOMPANYINFO, ",", SystemSet._OUTHELPCOMPANYINFO));

            if (ddlProjectType.SelectValue != "" && ddlProjectType.SelectValue != "0")
            {
                ht.Add("ProjectType", ddlProjectType.SelectValue);
            }
            if (kgsj1.Text.Trim().Length > 0)
            {
                ht.Add("kgsj", kgsj1.Text.Trim());
            }
            if (kgsj2.Text.Trim().Length > 0)
            {
                ht.Add("kgsj2", kgsj2.Text.Trim());
            }
            if (jgsj1.Text.Trim().Length > 0)
            {
                ht.Add("jgsj", jgsj1.Text.Trim());
            }
            if (jgsj2.Text.Trim().Length > 0)
            {
                ht.Add("jgsj2", jgsj2.Text.Trim());
            }
            if (txtGcbm.Text.Trim().Length > 0)
            {
                ht.Add("gcbm", txtGcbm.Text.Trim());
            }
            if (txtGcmc.Text.Trim().Length > 0)
            {
                ht.Add("gcmc", txtGcmc.Text.Trim());
            }
            if (txtGcdd.Text.Trim().Length > 0)
            {
                ht.Add("gcdd", txtGcdd.Text.Trim());
            }
            if (txtghxkzh.Text.Trim().Length > 0)
            {
                ht.Add("ghxkzh", txtghxkzh.Text.Trim());
            }
            if (txtsgxkzh.Text.Trim().Length > 0)
            {
                ht.Add("sgxkzh", txtsgxkzh.Text.Trim());
            }
            if (ddlChargeUserID.SelectValue != "" && ddlChargeUserID.SelectValue != "0")
            {
                ht.Add("ChargeUserID", ddlChargeUserID.SelectValue);
            }

            if (PublicModel.isSuperAdmin())        //超级管理员    Area_Code
            {
                ht.Add("Area_Code", Common.Session.GetSession("AREA_CODE"));
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                ht.Add("Area_Code", Common.Session.GetSession("OLD_AREA_CODE"));
            }
            else                                    //建设单位看自己相关的,监理,施工无权限
            {
                ht.Add("CompanyId", Common.Session.GetSession("CompanyId"));
            }

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

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <summary>
        /// 绑定列表数据
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGrid(int pageIndex)
        {
            StringBuilder strWhere = new StringBuilder();

            strWhere.Append(" 1=1 ");
            string CompanyID = "0";

            if (kgsj1.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.kgsj>='" + kgsj1.Text.Trim() + " 00:00:00.00 ' ");
            }
            if (kgsj2.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.kgsj<='" + kgsj2.Text.Trim() + " 23:59:59.99' ");
            }
            if (jgsj1.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.jgsj>='" + jgsj1.Text.Trim() + " 00:00:00.00 ' ");
            }
            if (jgsj2.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.jgsj<='" + jgsj2.Text.Trim() + " 23:59:59.99' ");
            }
            if (txtGcmc.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.gcmc like '%" + txtGcmc.Text.Trim() + "%' ");
            }
            if (txtGcdd.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.gcdd like '%" + txtGcdd.Text.Trim() + "%' ");
            }
            if (txtghxkzh.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.ghxkzh like '%" + txtghxkzh.Text.Trim() + "%' ");
            }
            if (txtsgxkzh.Text.Trim().Length > 0)
            {
                strWhere.Append(" AND a.sgxkzh like '%" + txtsgxkzh.Text.Trim() + "%' ");
            }
            if (ddlChargeUserID.SelectValue != "" && ddlChargeUserID.SelectValue != "0")
            {
                strWhere.Append(" AND a.ChargeUserID= " + ddlChargeUserID.SelectValue);
            }
            if (ddlProjectType.SelectValue != "" && ddlProjectType.SelectValue != "0")
            {
                strWhere.Append(" AND a.ProjectType=(select SystemInfoCode from T_SystemInfo where SystemInfoID=" + ddlProjectType.SelectValue + ") ");
            }
            if (ddl_WorkFlowName.SelectValue != "" && ddl_WorkFlowName.SelectValue != "0")
            {
                strWhere.Append(" AND d.WorkFlowID =" + ddl_WorkFlowName.SelectValue + " ");
            }

            if (PublicModel.isSuperAdmin())  //超级管理员看全部
            {
                strWhere.Append(" and a.Area_Code like '" + ConvertEx.ToString(Session["AREA_CODE"]) + "%' ");
            }
            else if (PublicModel.isArchiveUser())    //档案馆的人看全部部分
            {
                strWhere.Append("and a.Area_Code = '" + ConvertEx.ToString(Session["OLD_AREA_CODE"]) + "' ");
            }
            else if (PublicModel.isLeader())    //工程管理员(建设单位)也看全部
            {
                CompanyID = Common.Session.GetSession("CompanyId");
            }
            else
            {
                CompanyID = "0";
                strWhere.Append(" AND EXISTS(select distinct SingleProjectID from T_SingleProjectCompany where ");
                strWhere.Append("CompanyID=" + Common.Session.GetSession("CompanyId") + " AND SingleProjectID=a.SingleProjectID )");
            }
            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 = singleProjectBLL.GetListPaging(ConvertEx.ToInt(CompanyID), strWhere.ToString(), pageSize, pageIndex, out itemCount);;

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

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

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