示例#1
0
        protected void getOldestProj()
        {
            string querysql = "";

            //查找所有申报成功的项目
            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                querysql = "select top 1 startdate from tz_project where startdate is not null and sysstatus!=-1 and ProState='申报' order by startdate";
            }
            //查找本部门申报成功的项目
            else
            {
                querysql = "select top 1 startdate from tz_project where startdeptguid='" + CurrentUser.UserGroup.Guid + "' and startdate is not null and sysstatus!=-1 and ProState='申报' order by startdate";
            }
            Yawei.DataAccess.Database db = Yawei.DataAccess.DatabaseFactory.CreateDatabase();
            //获取资金支付情况

            DataSet ds = db.ExecuteDataSet(querysql);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                string   strdate = ds.Tables[0].Rows[0]["StartDate"].ToString();
                DateTime date    = DateTime.Parse(strdate);
                StartYear = date.Year;
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string username = CurrentUser.user.UserLoginName;

            roleCheck = new RoleCheck(CurrentUser);

            bmGuid = CurrentUser.UserGroup.Guid;

            //查看本部门审核通过的项目
            bmWhere = " (StartDeptGuid='" + bmGuid + "' and ProState='申报')";

            //此处查看所有审核通过的项目
            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                roleWhere = " ProState='申报'";
            }

            if (roleWhere != "")
            {
                sqlWhere = baseWhere + " and (" + bmWhere + " or " + roleWhere + ")";
            }
            else
            {
                sqlWhere = baseWhere + " and (" + bmWhere + ")";
            }
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            roleCheck = new RoleCheck(CurrentUser);

            db = Yawei.DataAccess.DatabaseFactory.CreateDatabase();

            string querysql = "";

            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                querysql = "select * from View_tz_xmjd";
            }
            else
            {
                sqlwhere += " and StartDeptGuid='" + CurrentUser.UserGroup.Guid + "'";
                querysql  = "select * from View_tz_xmjd where StartDeptGuid='" + CurrentUser.UserGroup.Guid + "'";
            }
            dsJdtj = db.ExecuteDataSet(querysql);
            //项目申报 即提交未通过状态的
            ss[0] = dsJdtj.Tables[0].Select("prostate='提交' or prostate='退回'").Count().ToString();
            //项目立项 即审核通过后续信息未维护的
            ss[1] = dsJdtj.Tables[0].Select("prostate='申报' and jscount=0 and yscount=0 and ywcount=0").Count().ToString();
            //项目建设 即审核通过维护过项目建设信息 但没有验收和运维信息的
            ss[2] = dsJdtj.Tables[0].Select("prostate='申报' and jscount<>0 and yscount=0 and ywcount=0").Count().ToString();
            //项目验收  审核通过 有项目建设信息 也有验收信息的
            ss[3] = dsJdtj.Tables[0].Select("prostate='申报'  and yscount<>0 and ywcount=0").Count().ToString();
            //项目运维 均有
            ss[4] = dsJdtj.Tables[0].Select("prostate='申报'  and ywcount<>0").Count().ToString();
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 接受参数
            roleCheck = new RoleCheck(CurrentUser);
            strGuid   = Request["xmguid"] != null ? Request["xmguid"] : "";
            userGuid  = CurrentUser.UserGuid;
            depGuid   = CurrentUser.UserGroup.Guid;

            checkReturnHistory();
            #endregion

            #region 初始化信息

            form.TableName   = "tz_zftz_Project"; //表名
            form.Key         = "ProGuid";         //主键
            form.KeyValue    = strGuid;           //主键的值
            form.CurrentUser = CurrentUser;
            document         = form.SetViewData(null);

            //管理员用户编辑权限一直开放
            //其他部门用户在未提交或者被退回状态下可以编辑
            if (roleCheck.isAdmin() || (document["ProState"] == "" || document["ProState"] == "退回"))
            {
                isEditable = true;
            }
            //可退回状态,生成唯一退回标识码
            if (document["ProState"] == "提交" && (roleCheck.isAdmin() || roleCheck.isZfb() || roleCheck.isFgwAdmin()))
            {
                returnGuid  = System.Guid.NewGuid().ToString();
                successGuid = System.Guid.NewGuid().ToString();
                holdGuid    = System.Guid.NewGuid().ToString();
                mergeGuid   = System.Guid.NewGuid().ToString();
            }

            //if (!UserCheck.checkIsAdmin(CurrentUser.user.UserLoginName))
            //{
            //    isAdmin = false;
            //    DataSet ds = db.ExecuteDataSet(" select * from tz_Project where ProGuid='" + strGuid + "'");
            //    prostate = ds.Tables[0].Rows[0]["ProState"].ToString();
            //    //未提交或者退回的项目申请提供编辑功能
            //    if (prostate == "" || prostate == "退回")
            //    {
            //        isEditable = true;
            //    }

            //}
            //else
            //{
            //    isAdmin = true;
            //    isEditable = true;
            //}

            #endregion

            System.GC.Collect();
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            roleCheck = new RoleCheck(CurrentUser);
            string type = Request["type"] != null ? Request["type"] : "";

            if (roleCheck.isAdmin() || roleCheck.isZfb() || roleCheck.isSjj())
            {
                roleWhere = "";
                roletype  = "0";
            }
            //部门用户只显示本部门金额数据
            else
            {
                roletype   = "1";
                roleWhere += " and StartDeptGuid='" + CurrentUser.UserGroup.Guid + "'";
            }
            sqlWhere += roleWhere + " and Prostate='申报'";
            if (type == "post")
            {
                Database db = DatabaseFactory.CreateDatabase();

                string    result = string.Empty;
                DataTable dt;
                if (roleCheck.isSjj() || roleCheck.isAdmin() || roleCheck.isZfb())
                {
                    dt = db.ExecuteDataSet("SELECT sum(htje) AS htje,sum(Quota) AS ygje,sum(zfje) AS zfje FROM V_FundSummary").Tables[0];
                }
                else
                {
                    dt = db.ExecuteDataSet("SELECT sum(htje) AS htje,sum(Quota) AS ygje,sum(zfje) AS zfje FROM V_FundSummary  where StartDeptGuid='" + CurrentUser.UserGroup.Guid + "'").Tables[0];
                }

                if (dt.Rows.Count > 0)
                {
                    result = dt.Rows[0]["ygje"].ToString() + "," + dt.Rows[0]["htje"].ToString() + "," + dt.Rows[0]["zfje"].ToString();
                }
                Response.Clear();
                Response.Write(result);
                Response.Flush();
                Response.End();
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            roleCheck = new RoleCheck(CurrentUser);


            Database db      = DatabaseFactory.CreateDatabase();
            string   projSql = "";

            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                projSql = "select a.*,year(startdate) as xmyear,year(b.YsDate) as ysyear,b.ysresult as ysresult,b.ysdate as ysdate  from V_TZ_ProjectOverview a left join tz_xmys b on a.proguid=b.xmguid";
            }
            else
            {
                projSql = "select a.*,year(startdate) as xmyear,year(b.YsDate) as ysyear,b.ysresult as ysresult,b.ysdate as ysdate  from V_TZ_ProjectOverview a left join tz_xmys b on a.proguid=b.xmguid where startdeptguid='" + CurrentUser.UserGroup.Guid + "' order by  startdate desc,createdate desc";
            }
            dsProj = db.ExecuteDataSet(projSql);



            //DataSet ds = db.ExecuteDataSet("select *,year(startdate) as st,year(ysdate) as yt from View_Ys_tz_Project where sysstatus<>-1 order by ysdate desc");
            YSCount = "[" + dsProj.Tables[0].Rows.Count + "," + dsProj.Tables[0].Select("yscount<>0").Length + "]";

            for (int i = DateTime.Now.Year - 4; i <= DateTime.Now.Year; i++)
            {
                Year += i + ",";
                s    += dsProj.Tables[0].Select("xmyear=" + i).Length + ",";
                es   += dsProj.Tables[0].Select("ysyear=" + i).Length + ",";
            }
            Year = "[" + Year.TrimEnd(',') + "]";
            s    = "[" + s.TrimEnd(',') + "]";
            es   = "[" + es.TrimEnd(',') + "]";

            //ds = db.ExecuteDataSet("select top 10 *,year(startdate) as st,year(ysdate) as yt from View_Ys_tz_Project where sysstatus<>-1 and ysdate is not null order by ysdate desc");

            for (int i = 0; i < dsProj.Tables[0].Select("yscount<>0").Count(); i++)
            {
                DataRow row = dsProj.Tables[0].Select("yscount<>0")[i];
                table += "<tr>";
                if (!roleCheck.isBm())
                {
                    table += "<td>" + row["StartDeptName"] + "</td>";
                }

                table += "<td>" + row["ProName"] + "</td>";
                table += "<td>" + row["Quota"] + "</td>";
                table += "<td>" + row["MoneySource"] + "</td>";
                table += "<td>" + row["ProType"] + "</td>";
                table += "<td>" + row["ysdate"].ToString().Substring(0, row["ysdate"].ToString().Length - 7) + "</td>";
                table += "<td>" + row["ysresult"] + "</td>";
                table += "</tr>";
            }
        }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     roleCheck = new RoleCheck(CurrentUser);
     if (roleCheck.isAdmin() || roleCheck.isZfb() || roleCheck.isSjj())
     {
         roleWhere = "";
     }
     //部门用户只显示本部门金额数据
     else
     {
         roleWhere += " and StartDeptGuid='" + CurrentUser.UserGroup.Guid + "'";
     }
     sqlWhere += roleWhere;
 }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取角色检查器
            roleCheck = new RoleCheck(CurrentUser);
            bmGuid    = CurrentUser.UserGroup.Guid;

            //只能查看未删除的以及已经验收过的
            baseWhere = " and sysstatus!=-1 and ysguid is not null and ProState='申报' ";

            //部门只能查看自己的项目
            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                sqlWhere = baseWhere + " ";
            }
            else
            {
                sqlWhere = baseWhere + " and StartDeptGuid='" + bmGuid + "' ";
            }
        }
示例#9
0
        protected string roleType  = "0"; //0是部门用户 1是其他,2是部门管理员
        protected void Page_Load(object sender, EventArgs e)
        {
            roleCheck = new RoleCheck(CurrentUser);
            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                //管理部门能查看所有提交或者通过的项目
                roleWhere = "ProState!='' and ProState is not null";
                formStyle = "float:right;width:80%";
                initTree();
                roleType = "1";
            }
            else
            {
                //部门能查询所有未删除的
                roleWhere = "";
            }
            string type = Request["type"] != null ? Request["type"] : "";

            if (type == "post")
            {
                Database db     = DatabaseFactory.CreateDatabase();
                string   con    = Request["con"] != null ? Request["con"] : "";
                string   result = string.Empty;

                DataTable dt = db.ExecuteDataSet("SELECT count(proGuid) AS projCount, sum(Quota) as ygje,sum(htje) AS htje,sum(zfje) AS zfje FROM V_TZ_ProjectOverview WHERE SysStatus<>-1 " + con).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    //String.Format("{0:F}",Convert.ToDouble( dt.Rows[0]["projCount"].ToString()))
                    result = getTwoTail(dt.Rows[0]["projCount"].ToString()) + "," + getTwoTail(dt.Rows[0]["htje"].ToString()) + "," + getTwoTail(dt.Rows[0]["zfje"].ToString()) + "," + getTwoTail(dt.Rows[0]["ygje"].ToString());
                }
                Response.Clear();
                Response.Write(result);
                Response.Flush();
                Response.End();
            }
        }
示例#10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取角色检查器
            roleCheck = new RoleCheck(CurrentUser);
            bmGuid    = CurrentUser.UserGroup.Guid;

            //只能查看未删除的
            baseWhere = " and sysstatus!=-1";

            //部门只能查看自己的项目
            bmwhere = " StartDeptGuid='" + bmGuid + "' ";

            //根据用户角色的查询条件
            if (roleCheck.isAdmin() || roleCheck.isFgwAdmin())
            {
                //管理员查看所有提交或者退回或者申报通过的项目
                //roleWhere = " (ProState='提交' or ProState='申报' or ProState='退回' or ProState is NULL)";
                roleWhere = " (ProState='提交' or ProState='申报' or ProState='退回' or ProState='暂缓' or ProState='整合')";
            }
            //政府办用户(非管理员)
            else if (!roleCheck.isAdmin() && roleCheck.isZfb())
            {
                //政府办查看所有提交或者退回或者申报通过的项目
                roleWhere = " (ProState='提交' or ProState='申报' or ProState='退回' or ProState='暂缓' or ProState='整合')";
            }
            //审计局
            else if (!roleCheck.isAdmin() && !roleCheck.isZfb() && roleCheck.isSjj())
            {
                //审计局只能查看所有审核通过的项目,不可编辑更改
                roleWhere = " ProState='申报'";
            }

            if (roleWhere != "")
            {
                sqlWhere = baseWhere + " and " + "(" + bmwhere + "or" + roleWhere + ")";
            }
            else
            {
                sqlWhere = baseWhere + " and " + "(" + bmwhere + ")";
            }

            //能查看自己的

            //if (RoleCheck.hasRole("adminrole", CurrentUser))
            //{
            //    isAdmin = true;
            //    //管理员能查看自己新建的项目或者 部门已提交或者通过或者退回的项目
            //    roleWhere = " and (StartDeptGuid='" + bm + "' or (ProState is not null and ProState!='退回'))";
            //}
            //else
            //{
            //    if (RoleCheck.hasRole("checkrole", CurrentUser))
            //    {
            //        isCheck = true;
            //    }
            //    else
            //    {
            //        isBaseRole = true;
            //        //部门只能查看本部门的项目
            //        roleWhere = " and StartDeptGuid='" + bm + "'";
            //    }
            //}
        }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            roleCheck = new RoleCheck(CurrentUser);

            bmGuid     = CurrentUser.UserGroup.Guid;
            strGuid    = Request["Guid"] != null ? Request["Guid"] : "";
            proGuid    = Request["xmguid"] != null ? Request["xmguid"] : "";
            createType = Request["type"] != null ? Request["type"] : "";
            if (createType != "")
            {
                strProName = Request["proname"] != null ? Request["proname"] : "";
            }

            if (strGuid == "")
            {
                this.CreateDate.Value = DateTime.Now.ToString();
                ///处理有附件的页面 ViewState["Guid"] 无附件去掉以下代码
                if (ViewState["Guid"] == null)
                {
                    ViewState["Guid"] = Guid.NewGuid().ToString();
                }
                else
                {
                    form.StateGuid = ViewState["Guid"].ToString();
                }
            }
            else
            {
                ViewState["Guid"] = strGuid;
            }

            form.TableName   = "tz_xmyw"; //表名
            form.Key         = "guid";    //主键
            form.KeyValue    = strGuid;   //主键的值
            form.CurrentUser = CurrentUser;

            #region 初始化信息

            if (!IsPostBack)
            {
                form.SetControlValue(this.Page);
            }

            #endregion

            string bmWhere = " (StartDeptGuid='" + bmGuid + "' and ProState='申报')";

            //此处查看所有审核通过的项目
            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                roleWhere = "ProState='申报'";
            }

            if (roleWhere != "")
            {
                sqlWhere = baseWhere + "and (" + bmWhere + " or " + roleWhere + ")";
            }
            else
            {
                sqlWhere = baseWhere + "and (" + bmWhere + ")";
            }
            System.GC.Collect();
        }
示例#12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            roleCheck = new RoleCheck(CurrentUser);

            isFirstView = checkFirstView(); //判断该用户是否首次浏览
            insertViewHistory();            //插入浏览记录

            string projSql = "";

            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                projSql = "select a.*,year(startdate) as xmyear from V_TZ_ProjectOverview a";
            }
            else
            {
                projSql = "select a.*,year(startdate) as xmyear from V_TZ_ProjectOverview a where startdeptguid='" + CurrentUser.UserGroup.Guid + "'";
            }

            //查询近五年项目数据
            //yearSql = "SELECT year(StartDate) AS year,'申报' AS type FROM tz_Project WHERE ProState IN ('申报','立项','招标','实施','验收') AND sysstatus<>-1 AND year(StartDate) BETWEEN (year(getdate())-4) AND year(getdate()) GROUP BY  year(StartDate) UNION SELECT year(pfsj) AS year,'立项' AS type FROM tz_xmlx WHERE xmguid IN (SELECT ProGuid FROM tz_Project WHERE  sysstatus<>-1) AND year(pfsj) BETWEEN (year(getdate())-4) AND year(getdate()) GROUP BY  year(pfsj)UNION SELECT year(yssj) AS year,'验收' AS type FROM tz_xmys WHERE xmguid IN (SELECT ProGuid FROM tz_Project WHERE  sysstatus<>-1) AND year(yssj) BETWEEN (year(getdate())-4) AND year(getdate()) GROUP BY  year(yssj)";



            DataSet projDs = db.ExecuteDataSet(projSql);

            if (projDs.Tables[0].Rows.Count > 0)
            {
                int nowYear = DateTime.Now.Year;
                for (int i = 0; i < 5; i++)
                {
                    yearSb.Append("<tr>");
                    yearSb.Append("<td>" + (nowYear - i) + "</td>");
                    //申报数
                    yearSb.Append("<td>" + projDs.Tables[0].Select("xmyear=" + (nowYear - i) + " and prostate in('提交','退回','申报')").Count() + "</td>");
                    //立项数
                    yearSb.Append("<td>" + projDs.Tables[0].Select("xmyear=" + (nowYear - i) + " and prostate='申报'").Count() + "</td>");
                    //验收数
                    yearSb.Append("<td>" + projDs.Tables[0].Select("xmyear=" + (nowYear - i) + " and prostate='申报' and  (yscount<>0 or ywcount<>0)").Count() + "</td>");
                    yearSb.Append("</tr>");
                }
            }
            else
            {
                yearSb.Append("<tr><td>暂无统计信息</td></tr>");
            }



            //资金使用范围统计
            //string fwSql = "select * from tz_Project a left join (SELECT xmguid, sum( CAST (htje AS FLOAT))*10000 AS htje FROM tz_xmht  GROUP BY xmguid) b on a.ProGuid=b.xmguid where a.sysstatus!=-1";
            //DataSet fwDs = db.ExecuteDataSet(fwSql);
            if (projDs != null && projDs.Tables[0].Rows.Count > 0)
            {
                fwSb.Append("[" + projDs.Tables[0].Select("htje<100").Count() + "," + projDs.Tables[0].Select("htje<200 and htje>=100").Count() + "," + projDs.Tables[0].Select("htje>=200 and htje<500").Count() + "," + projDs.Tables[0].Select("htje>=500").Count() + "]");
            }
            else
            {
                fwSb.Append("[]");
            }



            //招标方式统计
            if (projDs != null && projDs.Tables[0].Rows.Count > 0)
            {
                zbSb.Append("[{value:" + projDs.Tables[0].Select("gkzbcount>0").Count() + ", name:'公开招标'},{value:" + projDs.Tables[0].Select("xjcount>0").Count() + ", name:'询价'},{value:" + projDs.Tables[0].Select("dylycount>0").Count() + ", name:'单一来源'},{value:" + projDs.Tables[0].Select("zjcgcount>0").Count() + ", name:'自行采购'},{value:" + projDs.Tables[0].Select("jzxcscount>0").Count() + ", name:'竞争性磋商'},{value:" + projDs.Tables[0].Select("yqzbcount>0").Count() + ", name:'邀请招标'},{value:" + projDs.Tables[0].Select("jzxtpcount>0").Count() + ", name:'竞争性谈判'}]");
                //zbSb.Append("[{value:" + projDs.Tables[0].Select("gkzbcount>0").Count() + "},{value:" + projDs.Tables[0].Select("xjcount>0").Count() + "},{value:" + projDs.Tables[0].Select("dylycount>0").Count() + "},{value:" + projDs.Tables[0].Select("zjcgcount>0").Count() + "},{value:" + projDs.Tables[0].Select("jzxcscount>0").Count() + "}]");
            }
            //if (zbDs.Tables[0].Rows.Count > 0)
            //{
            //    zbSb.Append("[{value:" + zbDs.Tables[0].Rows[0]["gkzb"] + ", name:'公开招标'},{value:" + zbDs.Tables[0].Rows[0]["xj"] + ", name:'询价'},{value:" + zbDs.Tables[0].Rows[0]["dyly"] + ", name:'单一来源'},{value:" + zbDs.Tables[0].Rows[0]["zjcg"] + ", name:'直接采购'},{value:" + zbDs.Tables[0].Rows[0]["jzxcs"] + ", name:'竞争性磋商'}]");
            //}
            else
            {
                zbSb.Append("[{value:0,name:\"公开招标\"},{value:0,name:\"询价\"},{value:0,name:\"单一来源\"},{value:0,name:\"自行采购\"},{value:0,name:\"竞争性磋商\"},{value:0,name:\"邀请招标\"},{value:0,name:\"竞争性谈判\"}]");
            }

            //资金使用情况
            if (projDs != null && projDs.Tables[0].Rows.Count > 0)
            {
                sySb.Append("[" + projDs.Tables[0].Select("zfje>=htje").Count() + "," + projDs.Tables[0].Select("zfje<htje").Count() + "]");
            }
            else
            {
                sySb.Append("[]");
            }


            string tjquerysql = "";

            //非部门用户展示部门统计信息
            if (roleCheck.isAdmin() || roleCheck.isSjj() || roleCheck.isZfb())
            {
                tableTitle = "部门项目概况";
                tjquerysql = "select count(*) as xmcount,sum(Quota) as total_ys,sum(htje) as total_htje,sum(zfje) as total_zfje,startdeptname from V_TZ_ProjectOverview  group by startdeptname,sortnum order by sortnum desc";
                dszftj     = db.ExecuteDataSet(tjquerysql);


                DataSet ds = db.ExecuteDataSet("select count(*) as xmcount,sum(Quota) as total_ys,sum(htje) as total_htje,sum(zfje) as total_zfje,startdeptname from V_TZ_ProjectOverview  where ProState='申报' group by startdeptname,sortnum order by sortnum desc");
                ds.Tables[0].DefaultView.Sort = "xmcount desc";
                dtXms = ds.Tables[0].DefaultView.ToTable();

                ds.Tables[0].DefaultView.Sort = "total_htje desc";
                dtHte = ds.Tables[0].DefaultView.ToTable();


                dsprotj = db.ExecuteDataSet("select * from V_TZ_ProjectOverview");
                if (dszftj != null && dszftj.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dszftj.Tables[0].Rows.Count; i++)
                    {
                        bmSb.Append("<tr>");
                        bmSb.Append("<td style='text-align:left'>" + dszftj.Tables[0].Rows[i]["startdeptname"] + "</td>");                                                                     //部门名称
                        bmSb.Append("<td>" + dszftj.Tables[0].Rows[i]["xmcount"].ToString() + "</td>");                                                                                        //项目申报总数
                        bmSb.Append("<td>" + dsprotj.Tables[0].Select("StartDeptName='" + dszftj.Tables[0].Rows[i]["startdeptname"] + "' and ProState='申报'").Count() + "</td>");               //立项项目数
                        bmSb.Append("<td>" + dsprotj.Tables[0].Select("StartDeptName='" + dszftj.Tables[0].Rows[i]["startdeptname"] + "' and ProState='申报' and yscount>0").Count() + "</td>"); //验收项目数
                        bmSb.Append("<td style='text-align:left'>" + dszftj.Tables[0].Rows[i]["total_ys"] + "</td>");                                                                          //预算总额
                        bmSb.Append("<td style='text-align:left'>" + dszftj.Tables[0].Rows[i]["total_htje"] + "</td>");                                                                        //合同总额
                        bmSb.Append("<td style='text-align:left'>" + dszftj.Tables[0].Rows[i]["total_zfje"] + "</td>");                                                                        //支付总额

                        bmSb.Append("</tr>");
                    }
                }
            }
            //部门用户展示项目信息
            else
            {
                DataSet dsprotj = db.ExecuteDataSet("select * from V_TZ_ProjectOverview where startdeptguid='" + CurrentUser.UserGroup.Guid + "' order by startdate desc,createdate desc");
                tableTitle = "项目信息";

                if (dsprotj != null && dsprotj.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsprotj.Tables[0].Rows.Count; i++)
                    {
                        int index = i + 1;
                        bmSb.Append("<tr>");
                        bmSb.Append("<td>" + index + "</td>");                                                                                                                        //部门名称
                        bmSb.Append("<td style='text-align:left'>" + dsprotj.Tables[0].Rows[i]["proname"] + "</td>");                                                                 //项目名称
                        bmSb.Append("<td>" + dsprotj.Tables[0].Rows[i]["startdate"].ToString().Substring(0, dsprotj.Tables[0].Rows[i]["startdate"].ToString().Length - 7) + "</td>"); //申报日期
                        bmSb.Append("<td style='text-align:left'>" + dsprotj.Tables[0].Rows[i]["quota"].ToString() + "</td>");                                                        //预算金额(万元)
                        bmSb.Append("<td style='text-align:left'>" + dsprotj.Tables[0].Rows[i]["htje"].ToString() + "</td>");                                                         //合同金额(万元)
                        bmSb.Append("<td style='text-align:left'>" + dsprotj.Tables[0].Rows[i]["zfje"].ToString() + "</td>");                                                         //支付金额(万元)
                        string xmzt = "";
                        if (dsprotj.Tables[0].Rows[i]["prostate"].ToString() == "提交" || dsprotj.Tables[0].Rows[i]["zfje"].ToString() == "退回")
                        {
                            xmzt = "申报";
                        }
                        else
                        {
                            if (dsprotj.Tables[0].Rows[i]["jscount"].ToString() == "0" && dsprotj.Tables[0].Rows[i]["yscount"].ToString() == "0" && dsprotj.Tables[0].Rows[i]["ywcount"].ToString() == "0")
                            {
                                xmzt = "立项";
                            }
                            else if (dsprotj.Tables[0].Rows[i]["jscount"].ToString() != "0" && dsprotj.Tables[0].Rows[i]["yscount"].ToString() == "0" && dsprotj.Tables[0].Rows[i]["ywcount"].ToString() == "0")
                            {
                                xmzt = "建设";
                            }
                            else if (dsprotj.Tables[0].Rows[i]["yscount"].ToString() != "0" && dsprotj.Tables[0].Rows[i]["ywcount"].ToString() == "0")
                            {
                                xmzt = "验收";
                            }
                            else if (dsprotj.Tables[0].Rows[i]["ywcount"].ToString() != "0")
                            {
                                xmzt = "运维";
                            }
                        }
                        bmSb.Append("<td style='text-align:left'>" + xmzt + "</td>");//项目阶段


                        bmSb.Append("</tr>");
                    }
                }
            }
        }