示例#1
0
    void ShowInit(string sql)
    {
        DataSet ds = new DataSet();

        string where = "b_sort=0";
        Tunnel.BLL.Tunnel_menber bm = new Tunnel.BLL.Tunnel_menber();
        ul.UsbnLogin = bm.GetModel(ul.LoginID);
        if ("search".Equals(sql))
        {
            if (DropDownList2.SelectedValue != "")
            {
                where += " and b_state=" + DropDownList2.SelectedValue;
            }
            if (TextBox1.Text.Trim() != "")
            {
                where += " and b_time>='" + TextBox1.Text + "'";
            }
            if (TextBox2.Text.Trim() != "")
            {
                where += " and b_time<='" + TextBox2.Text + "'";
            }
            if (TextBox4.Text.Trim() != "")
            {
                where += " and b_title like '%" + TextBox4.Text + "%'";
            }
            if (ul.JiaoSe(ul.LoginID) != "系统管理员")
            {
                where += " and b_user="******" order by b_state asc,b_time desc";
            ds     = tb.GetList(where);
            //对用于分页的类的引用
        }
        else
        {
            if (ul.JiaoSe(ul.LoginID) != "系统管理员")
            {
                where = "b_user="******" order by b_state asc,b_time desc";
            ds     = tb.GetList(where);
        }
        PagedDataSource pds = new PagedDataSource();

        pds.DataSource  = ds.Tables[0].DefaultView;//设置数据源(DataTable类型)
        pds.AllowPaging = true;
        //每页显示的行数
        //pds.PageSize = 12;
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
        pds.CurrentPageIndex     = AspNetPager1.CurrentPageIndex - 1;
        pds.PageSize             = AspNetPager1.PageSize;
        Repeater1.DataSource     = pds;
        Repeater1.DataBind();
    }
示例#2
0
    /// <summary>
    /// 页面数据绑定
    /// </summary>
    public void PageBind()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_Img";
        pb.FldName       = "i_id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = pageSize;
        if (cuttentPage == 0)
        {
            cuttentPage = pb.PageIndex;
        }
        pb.PageIndex = cuttentPage;
        if (ul.LoginID == 1 || ul.JiaoSe(ul.LoginID) == "系统管理员" || ul.JiaoSe(ul.LoginID) == "总经理")
        {
            theEncoding = 1;
            pb.StrWhere = "1=1 and  i_name like '%" + name + "%' ";
        }
        else
        {
            pb.StrWhere = "1=1 and  i_name like '%" + name + "%' and i_user=" + ul.LoginID;
        }
        int count = 0;

        pb.DoCount = 1;
        ti.GetList(pb, ref count); //获取总条数

        pb.DoCount = 0;
        if (false)
        {
            cuttentPage  = cuttentPage - 1;
            pb.PageIndex = cuttentPage;
        }
        List <Tunnel.Model.Tunnel_Img> modelList = new List <Tunnel.Model.Tunnel_Img>();

        modelList = ti.GetList(pb, ref count);//获取分页结果

        //数据绑定
        DataList1.DataSource = modelList;
        DataList1.DataBind();
        //数据分页
        MTCPager1.PageSize    = pageSize;
        MTCPager1.RecordCount = count;
        MTCPager1.PageIndex   = cuttentPage;
        if (count <= pb.PageSize)
        {
            MTCPager1.Visible = false;
        }
        else
        {
            MTCPager1.Visible = true;
        }
    }
示例#3
0
    void RepeaterBind(string where)
    {
        Tunnel.BLL.Tunnel_flow bflow = new Tunnel.BLL.Tunnel_flow();
        string bwhere = "";

        ul.UsbnLogin = tm.GetModel(ul.LoginID);
        if (ul.JiaoSe(ul.LoginID) != "系统管理员")
        {
            if (string.IsNullOrEmpty(where))
            {
                bwhere = "f_bum=" + ul.UsbnLogin.m_bum;
            }
            else
            {
                bwhere = " and f_bum=" + ul.UsbnLogin.m_bum;
            }
        }
        else
        {
            bwhere = "";
        }
        where += bwhere;
        DataSet ds = bflow.GetList(where);

        Repeater1.DataSource = ds;
        Repeater1.DataBind();
    }
示例#4
0
    public void PageBind(string where)
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_Performance";
        pb.FldName       = "Id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = pageSize;
        if (cuttentPage == 0)
        {
            cuttentPage = pb.PageIndex;
        }
        pb.PageIndex = cuttentPage;
        pb.StrWhere  = where;
        if (ul.LoginID > 1 && ul.JiaoSe(ul.LoginID) != "系统管理员")
        {
            if (!string.IsNullOrEmpty(where))
            {
                pb.StrWhere += " and CreateUser = "******" CreateUser = " + ul.LoginID;
            }
        }
        int count = 0;

        pb.DoCount = 1;
        rbll.GetList(pb, ref count); //获取总条数

        pb.DoCount = 0;
        if (delState == true && pageSize == count)
        {
            cuttentPage  = cuttentPage - 1;
            pb.PageIndex = cuttentPage;
        }
        List <Tunnel.Model.Tunnel_Performance> modelList = new List <Tunnel.Model.Tunnel_Performance>();

        modelList = rbll.GetList(pb, ref count);//获取分页结果


        //数据绑定
        Repeater1.DataSource = modelList;
        Repeater1.DataBind();

        //数据分页
        MTCPager1.PageSize    = pageSize;
        MTCPager1.RecordCount = count;
        MTCPager1.PageIndex   = cuttentPage;
        if (count <= pb.PageSize)
        {
            MTCPager1.Visible = false;
        }
        else
        {
            MTCPager1.Visible = true;
        }
    }
示例#5
0
    /// <summary>
    /// 页面数据绑定
    /// </summary>
    public void PageBind()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_information";
        pb.FldName       = "i_id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = pageSize;
        if (cuttentPage == 0)
        {
            cuttentPage = pb.PageIndex;
        }
        pb.PageIndex = cuttentPage;
        if (ul.LoginID != 1 && ul.JiaoSe(ul.LoginID) != "系统管理员")
        {
            pb.StrWhere = " i_sort = " + TypeId + " and i_user="******" and i_del=0";
        }
        else
        {
            pb.StrWhere = " i_sort = " + TypeId + " and i_del=0";
        }
        int count = 0;

        pb.DoCount = 1;
        mbll.GetList(pb, ref count); //获取总条数

        pb.DoCount = 0;
        //if (delState == true && pageSize == count)
        //{
        //    cuttentPage = cuttentPage - 1;
        //    pb.PageIndex = cuttentPage;
        //}
        List <Tunnel.Model.Tunnel_information> modelList = new List <Tunnel.Model.Tunnel_information>();

        if (!TextBox1.Text.Trim().Equals(""))
        {
            pb.StrWhere += " and i_title like '%" + TextBox1.Text.Trim() + "%' ";
        }
        modelList = mbll.GetList(pb, ref count);//获取分页结果

        //数据绑定
        Repeater1.DataSource = modelList;
        Repeater1.DataBind();

        //数据分页
        MTCPager1.PageSize    = pageSize;
        MTCPager1.RecordCount = count;
        MTCPager1.PageIndex   = cuttentPage;
        if (count <= pb.PageSize)
        {
            MTCPager1.Visible = false;
        }
        else
        {
            MTCPager1.Visible = true;
        }
    }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        RadioButton1.Enabled = true;
        RadioButton2.Enabled = true;
        if (!string.IsNullOrEmpty(Request.QueryString["id"]))
        {
            i_id = Request.QueryString["id"].ToString();
        }
        if (!IsPostBack)
        {
            Button1.Text = titleName;
            if (TypeId == 1)
            {
                RadioButton1.Checked = true;
            }
            else
            {
                RadioButton2.Checked = true;
            }
            Tunnel.Model.Tunnel_information information = new Tunnel.Model.Tunnel_information();

            information        = bll.GetModel(i_id);
            tb_Title.Text      = information.i_title;
            FreeTextBox1.Value = information.i_content;
            if (!information.i_files.Equals(""))
            {
                Label3.Visible = false;
                Label2.Visible = true;
                Label4.Visible = true;
                if (information.i_files.Equals(""))
                {
                    Label2.Text = "<br/>附件名:" + information.i_files.Substring(information.i_files.LastIndexOf("\\") + 1);
                }
                else
                {
                    Label2.Text = "<br/>附件名:" + information.i_files.Substring(information.i_files.LastIndexOf("\\") + 1);
                }
                Label3.Text = information.i_files;
            }
            else
            {
                Label3.Visible = false;
                Label2.Visible = false;
                Label4.Visible = false;
            }
            //Label2.Text = "<br/>附件名:" + information.i_files.Substring(information.i_files.LastIndexOf("\\") + 1); ;
            //Label3.Text = information.i_files;


            if (ul.LoginID != 1 && ul.JiaoSe(ul.LoginID) != "系统管理员")
            {
                RadioButton1.Enabled = false;
                RadioButton2.Enabled = false;
            }
        }
    }
示例#7
0
 public string ifshow(object o)
 {
     if (o.ToString() == ul.LoginID.ToString() || ul.JiaoSe(ul.LoginID) == "系统管理员" || ul.LoginID == 1)
     {
         return("disaply:''");
     }
     else
     {
         return("display:none");
     }
 }
示例#8
0
 public bool ifshow(object o)
 {
     if (o.ToString() == ul.LoginID.ToString() || ul.JiaoSe(ul.LoginID) == "系统管理员" || ul.LoginID == 1)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#9
0
    public void PageBind()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_report";
        pb.FldName       = "r_id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = pageSize;
        if (cuttentPage == 0)
        {
            cuttentPage = pb.PageIndex;
        }
        pb.PageIndex = cuttentPage;

        if (ul.LoginID > 1 && ul.JiaoSe(ul.LoginID) != "系统管理员")
        {
            pb.StrWhere = " r_user = " + ul.LoginID;
        }
        int count = 0;

        pb.DoCount = 1;
        rbll.GetList(pb, ref count); //获取总条数

        pb.DoCount = 0;
        if (delState == true && pageSize == count)
        {
            cuttentPage  = cuttentPage - 1;
            pb.PageIndex = cuttentPage;
        }
        List <Tunnel.Model.Tunnel_report> modelList = new List <Tunnel.Model.Tunnel_report>();

        modelList = rbll.GetList(pb, ref count);//获取分页结果


        //数据绑定
        Repeater1.DataSource = modelList;
        Repeater1.DataBind();

        //数据分页
        MTCPager1.PageSize    = pageSize;
        MTCPager1.RecordCount = count;
        MTCPager1.PageIndex   = cuttentPage;
        if (count <= pb.PageSize)
        {
            MTCPager1.Visible = false;
        }
        else
        {
            MTCPager1.Visible = true;
        }
    }
示例#10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            titleId = 0;
            //this.Label1.Visible = false;
            //根据登录者ID判断是否存在于某部门

            //如果是管理员登陆,则可查看所有列表信息

            if (ul.LoginID == 1 || "系统管理员" == ul.JiaoSe(ul.LoginID))
            {
                //mostList = st.GetModelList("1=1 and bumname not in ('党工团','项目经理部') order by bumname desc");
                mostList = st.GetModelList("1=1 order by bumname desc");
                //若系统管理员也属于某部门
            }
            else
            {
                //若此用户不在任何部门里,则无操作
                if (tm.GetModel(ul.LoginID).m_bum == 0)
                {
                    //this.Label1.Visible = true;
                }
                else
                {
                    //若是用户登录,则根据其所属部门得出相应列表信息

                    // 根据登陆ID 找到 member表里对应的m_bum部门ID,然后再找出部门名称

                    most.BumID   = tm.GetModel(ul.LoginID).m_bum.ToString().Trim();
                    most.BumName = tb.GetModel(long.Parse(most.BumID.ToString())).b_name;
                    // st.GetModelList("BumName=" + most.BumName);
                    mostList = st.GetModelList("BumName='" + most.BumName + "' or bumname in ('科室信息','总工室')");
                }
            }

            if (!string.IsNullOrEmpty(Request.QueryString["pagetitle"]))
            {
                titleId = Convert.ToInt32(Request.QueryString["pagetitle"]);
                if (titleId == 1)
                {
                    pagetitlestr = "科室信息修改";
                }
                indexId = 0;
                indexId = Convert.ToInt32(Request.QueryString["indexId"]);
                PageBind(indexId);
            }
        }
    }
示例#11
0
    /// <summary>
    /// 得到所有权限
    /// </summary>
    public Dictionary <int, string> getAllPermission()
    {
        Dictionary <int, string> allDic = new Dictionary <int, string>();

        Tunnel.BLL.Tunnel_quanxian          tq     = new Tunnel.BLL.Tunnel_quanxian();
        List <Tunnel.Model.Tunnel_quanxian> tqList = new List <Tunnel.Model.Tunnel_quanxian>();

        if (ul.JiaoSe(ul.LoginID) == "系统管理员")
        {
            tqList = tq.GetModelList("1=1 order by q_rId asc ");
            foreach (Tunnel.Model.Tunnel_quanxian item in tqList)
            {
                allDic.Add(item.q_id, item.q_mark + "-->>" + item.q_name);
            }
        }
        else
        {
            Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
            Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();
            tmm = tm.GetModel(ul.LoginID);
            if (!string.IsNullOrEmpty(Convert.ToString(tmm.m_bum)))
            {
                Tunnel.BLL.Tunnel_byingshe          tb     = new Tunnel.BLL.Tunnel_byingshe();
                Tunnel.Model.Tunnel_byingshe        tbb    = new Tunnel.Model.Tunnel_byingshe();
                List <Tunnel.Model.Tunnel_byingshe> tbList = new List <Tunnel.Model.Tunnel_byingshe>();
                tbList = tb.GetModelList("by_bid = " + tmm.m_bum + "");
                if (tbList.Count > 0)
                {
                    tbb = tbList[0];
                    string byList = tbb.by_list;
                    if (byList.Length > 0)
                    {
                        string[] temp = byList.Split('|');
                        foreach (string item in temp)
                        {
                            Tunnel.Model.Tunnel_quanxian tqq = new Tunnel.Model.Tunnel_quanxian();
                            tqq = tq.GetModel(int.Parse(item));
                            if (tqq != null)
                            {
                                allDic.Add(tqq.q_id, tqq.q_mark + "-->>" + tqq.q_name);
                            }
                        }
                    }
                }
            }
        }
        return(allDic);
    }
示例#12
0
        /// <summary>
        /// 查看是否有权限
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <param name="XreqestStr">小类</param>
        /// <param name="BreqestStr">大类</param>
        /// <returns>true有权限</returns>
        public static bool IfHasPrimision(string userID, string XreqestStr, string BreqestStr, bool IfRead)
        {
            string tmpUid = string.Empty;
            string tmpBid = string.Empty;
            string tmpDid = string.Empty;
            string tmpJid = string.Empty;

            Tunnel.BLL.Tunnel_menber          tm     = new Tunnel_menber();
            Tunnel.Model.Tunnel_menber        tmm    = new Tunnel.Model.Tunnel_menber();
            List <Tunnel.Model.Tunnel_menber> tmlist = new List <Tunnel.Model.Tunnel_menber>();

            Tunnel.BLL.Tunnel_jiaose   tj  = new Tunnel_jiaose();
            Tunnel.Model.Tunnel_jiaose tjj = new Tunnel.Model.Tunnel_jiaose();


            Tunnel.BLL.Tunnel_quanxian          qx     = new Tunnel_quanxian();
            Tunnel.Model.Tunnel_quanxian        qxx    = new Tunnel.Model.Tunnel_quanxian();
            List <Tunnel.Model.Tunnel_quanxian> qxlist = new List <Tunnel.Model.Tunnel_quanxian>();

            Tunnel.BLL.Tunnel_yingshe          tyj     = new Tunnel_yingshe();
            Tunnel.Model.Tunnel_yingshe        tyjj    = new Tunnel.Model.Tunnel_yingshe();
            List <Tunnel.Model.Tunnel_yingshe> tyjlist = new List <Tunnel.Model.Tunnel_yingshe>();

            Tunnel.BLL.Tunnel_uyingshe          tyu     = new Tunnel_uyingshe();
            Tunnel.Model.Tunnel_uyingshe        tyuu    = new Tunnel.Model.Tunnel_uyingshe();
            List <Tunnel.Model.Tunnel_uyingshe> tyulist = new List <Tunnel.Model.Tunnel_uyingshe>();

            Tunnel.BLL.Tunnel_byingshe          tyb     = new Tunnel_byingshe();
            Tunnel.Model.Tunnel_byingshe        tybb    = new Tunnel.Model.Tunnel_byingshe();
            List <Tunnel.Model.Tunnel_byingshe> tyblist = new List <Tunnel.Model.Tunnel_byingshe>();

            Tunnel.BLL.Tunnel_dyingshe          tyd     = new Tunnel_dyingshe();
            Tunnel.Model.Tunnel_dyingshe        tydd    = new Tunnel.Model.Tunnel_dyingshe();
            List <Tunnel.Model.Tunnel_dyingshe> tydlist = new List <Tunnel.Model.Tunnel_dyingshe>();

            UserLogin ul    = new UserLogin();
            bool      b     = false;
            string    qxStr = string.Empty;

            tmm    = tm.GetModel(Convert.ToInt64(userID));
            tmpBid = tmm.m_bum.ToString();
            tmpJid = tmm.m_jiao.ToString();
            tmpDid = tmm.m_duty.ToString();
            tmpUid = userID;

            tyulist = tyu.GetModelList("uy_uid='" + tmpUid + "'");

            if (tyulist.Count > 0)
            {
                if (tyulist[0].uy_list.Length > 0)
                {
                    qxStr += tyulist[0].uy_list + "|";
                }
            }

            tyjlist = tyj.GetModelList("y_jsid=" + tmpJid + "");

            if (tyjlist.Count > 0)
            {
                if (tyjlist[0].y_qxlist.Length > 0)
                {
                    qxStr += tyjlist[0].y_qxlist + "|";
                }
            }

            tyblist = tyb.GetModelList("by_bid='" + tmpBid + "'");

            if (tyblist.Count > 0)
            {
                if (tyblist[0].by_list.Length > 0)
                {
                    qxStr += tyblist[0].by_list + "|";
                }
            }


            tydlist = tyd.GetModelList("dy_did='" + tmpDid + "'");
            if (tydlist.Count > 0)
            {
                if (tydlist[0].dy_list.Length > 0)
                {
                    qxStr += tydlist[0].dy_list + "|";
                }
            }


            if (qxStr.Length > 0)
            {
                qxStr = qxStr.Substring(0, qxStr.Length - 1);
            }
            if (userID != "1" && ul.JiaoSe(int.Parse(userID)) != "系统管理员")
            {
                if (IfRead)
                {
                    if (tmpJid != "0")
                    {
                        if (ul.JiaoSe(int.Parse(userID)) == "总经理")
                        {
                            b = true;
                        }
                    }
                }
                if (!string.IsNullOrEmpty(qxStr))
                {
                    qxlist = qx.GetModelList("q_name='" + XreqestStr + "' and q_mark='" + BreqestStr + "'");
                    if (qxlist.Count > 0)
                    {
                        foreach (string item in qxStr.Split('|'))
                        {
                            if (qxlist[0].q_id.ToString().Equals(item.ToString()))
                            {
                                b = true;
                            }
                        }
                    }
                }
            }
            else
            {
                b = true;
            }
            return(b);
        }
示例#13
0
    /// <summary>
    /// 页面数据绑定
    /// </summary>
    public void PageBind()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_Img";
        pb.FldName       = "i_id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = pageSize;
        if (cuttentPage == 0)
        {
            cuttentPage = pb.PageIndex;
        }
        pb.PageIndex = cuttentPage;
        if (ul.LoginID == 1 || ul.JiaoSe(ul.LoginID) == "系统管理员" || ul.JiaoSe(ul.LoginID) == "总经理")
        {
            theEncoding = 1;

            #region  判断条件
            if (name != "")
            {
                if (this.ddlYear.SelectedValue == "" && ddlType.SelectedValue == "")
                {
                    pb.StrWhere = "  i_name like '%" + name + "%' ";
                }
                else if (this.ddlYear.SelectedValue != "" && ddlType.SelectedValue == "")
                {
                    pb.StrWhere = string.Format(" i_name like '%{0}%' i_year ='{1}'", name, ddlYear.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue == "")
                {
                    pb.StrWhere = string.Format(" i_name like '%{0}%' i_type ='{1}'", name, ddlType.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue != "")
                {
                    pb.StrWhere = string.Format("  i_name like '%{0}%' and i_year='{1}' and i_type='{2}'", name, ddlYear.SelectedValue.ToString(), ddlType.SelectedValue);
                }
            }
            else
            {
                if (this.ddlYear.SelectedValue != "" && ddlType.SelectedValue == "")
                {
                    pb.StrWhere = string.Format(" i_year ='{0}'", ddlYear.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue == "")
                {
                    pb.StrWhere = string.Format("  i_type ='{0}'", ddlType.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue != "")
                {
                    pb.StrWhere = string.Format(" i_year='{0}' and i_type='{1}'", ddlYear.SelectedValue.ToString(), ddlType.SelectedValue);
                }
                else if (ddlType.SelectedValue == "" && this.ddlYear.SelectedValue == "")
                {
                    pb.StrWhere = "";
                }
            }
            #endregion
        }
        else
        {
            #region  判断条件
            if (name != "")
            {
                if (this.ddlYear.SelectedValue == "" && ddlType.SelectedValue == "")
                {
                    pb.StrWhere = "  i_name like '%" + name + "%' ";
                }
                else if (this.ddlYear.SelectedValue != "" && ddlType.SelectedValue == "")
                {
                    pb.StrWhere = string.Format(" i_name like '%{0}%' i_year ='{1}'", name, ddlYear.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue == "")
                {
                    pb.StrWhere = string.Format(" i_name like '%{0}%' i_type ='{1}'", name, ddlType.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue != "")
                {
                    pb.StrWhere = string.Format("  i_name like '%{0}%' and i_year='{1}' and i_type='{2}'", name, ddlYear.SelectedValue.ToString(), ddlType.SelectedValue);
                }
            }
            else
            {
                if (this.ddlYear.SelectedValue != "" && ddlType.SelectedValue == "")
                {
                    pb.StrWhere = string.Format(" i_year ='{0}'", ddlYear.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue == "")
                {
                    pb.StrWhere = string.Format("  i_type ='{0}'", ddlType.SelectedValue.ToString());
                }
                else if (ddlType.SelectedValue != "" && this.ddlYear.SelectedValue != "")
                {
                    pb.StrWhere = string.Format(" i_year='{0}' and i_type='{1}'", ddlYear.SelectedValue.ToString(), ddlType.SelectedValue);
                }
                else if (ddlType.SelectedValue == "" && this.ddlYear.SelectedValue == "")
                {
                    pb.StrWhere = "";
                }
            }
            #endregion
        }
        int count = 0;
        pb.DoCount = 1;
        ti.GetList(pb, ref count); //获取总条数

        pb.DoCount = 0;
        if (false)
        {
            cuttentPage  = cuttentPage - 1;
            pb.PageIndex = cuttentPage;
        }
        List <Tunnel.Model.Tunnel_Img> modelList = new List <Tunnel.Model.Tunnel_Img>();
        modelList = ti.GetList(pb, ref count);//获取分页结果

        //数据绑定
        DataList1.DataSource = modelList;
        DataList1.DataBind();
        //数据分页
        MTCPager1.PageSize    = pageSize;
        MTCPager1.RecordCount = count;
        MTCPager1.PageIndex   = cuttentPage;
        if (count <= pb.PageSize)
        {
            MTCPager1.Visible = false;
        }
        else
        {
            MTCPager1.Visible = true;
        }
    }
示例#14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            titleId             = 0;
            this.Label1.Visible = false;
            //根据登录者ID判断是否存在于某部门

            //如果是管理员登陆,则可查看所有列表信息

            mostList = st.GetModelList("1=1 and BumName = '项目经理部' order by bumname desc");
            //若系统管理员也属于某部门

            if (tm.GetModel(ul.LoginID).m_bum != 0)
            {
                for (int t = 0; t < mostList.Count; t++)
                {
                    DropDownList1.Items.Add(new ListItem(mostList[t].TypeName + "(" + mostList[t].BumName + ")", mostList[t].TypeID.ToString()));
                }
                DropDownList1.Items.Insert(0, new ListItem("-请选择-", "0"));


                if (ul.LoginID == 1 || "系统管理员" == ul.JiaoSe(ul.LoginID))
                {
                }
                else
                {
                    ddlquanxianbind();
                }
            }
            else
            {
            }



            //if (ul.LoginID == 1 || "系统管理员" == ul.JiaoSe(ul.LoginID))
            //{

            //}
            //else
            //{
            //若此用户不在任何部门里,则无操作
            if (tm.GetModel(ul.LoginID).m_bum == 0)
            {
                this.Label1.Visible = true;
            }
            else
            {
                //若是用户登录,则根据其所属部门得出相应列表信息

                // 根据登陆ID 找到 member表里对应的m_bum部门ID,然后再找出部门名称

                //most.BumID = tm.GetModel(ul.LoginID).m_bum;
                //most.BumName = tb.GetModel(long.Parse(most.BumID.ToString())).b_name;
                //// st.GetModelList("BumName=" + most.BumName);
                //mostList = st.GetModelList("BumName='" + most.BumName + "'");

                //for (int j = 0; j < mostList.Count; j++)
                //{
                //    DropDownList1.Items.Add(new ListItem(mostList[j].TypeName + "(" + mostList[j].BumName + ")", mostList[j].TypeID.ToString()));
                //}
                DropDownList2.Items.Clear();
                DropDownList2.Items.Add(new ListItem("请选择类型", "-1"));
            }
            //}

            if (!string.IsNullOrEmpty(Request.QueryString["pagetitle"]))
            {
                titleId = Convert.ToInt32(Request.QueryString["pagetitle"]);
                if (titleId == 1)
                {
                    pagetitlestr = "项经部信息修改";
                }
                indexId = 0;
                indexId = Convert.ToInt32(Request.QueryString["indexId"]);
                PageBind(indexId);
            }
        }
    }
示例#15
0
 public void ListBind()
 {
     if (ul.JiaoSe(ul.LoginID).Equals("系统管理员"))
     {
         where = "";
         PageBind2();
     }
     else
     {
         Tunnel.BLL.Tunnel_bum tb  = new Tunnel.BLL.Tunnel_bum();
         Tunnel_bum            tbb = new Tunnel_bum();
         tmm = tm.GetModel(Convert.ToInt64(ul.LoginID.ToString()));
         if (tmm != null)
         {
             if (!string.IsNullOrEmpty(tmm.m_bum.ToString()))
             {
                 tbb = tb.GetModel(Convert.ToInt64(tmm.m_bum.ToString()));
                 if (tbb != null)
                 {
                     List <Tunnel.Model.Tunnel_SelType> tsList = new List <Tunnel_SelType>();
                     Tunnel.BLL.SelType tst = new Tunnel.BLL.SelType();
                     tsList = tst.GetModelList("");
                     // bumname='" + tbb.b_name + "'
                     if (tsList.Count > 0)
                     {
                         for (int i = 0; i < tsList.Count; i++)
                         {
                             bhtype += tsList[i].TypeID.ToString() + "|";
                         }
                         if (bhtype.Length > 0)
                         {
                             bhtype = bhtype.Substring(0, bhtype.Length - 1);
                         }
                     }
                     where = "";
                     for (int i = 0; i < bhtype.Split('|').Length; i++)
                     {
                         if (where.Length > 0)
                         {
                             if (i == bhtype.Split('|').Length - 1)
                             {
                                 where += "  or typeid=" + bhtype.Split('|')[i] + ")";
                             }
                             else
                             {
                                 where += "  or typeid=" + bhtype.Split('|')[i] + "";
                             }
                         }
                         else
                         {
                             where += "   (typeid=" + bhtype.Split('|')[i] + "";
                         }
                     }
                     PageBind2();
                 }
                 else
                 {
                     MTCPager1.RecordCount = 0;
                 }
             }
         }
     }
 }
示例#16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            titleId             = 0;
            this.Label1.Visible = false;
            //根据登录者ID判断是否存在于某部门

            //如果是管理员登陆,则可查看所有列表信息

            if (ul.LoginID == 1 || "系统管理员" == ul.JiaoSe(ul.LoginID))
            {
                //mostList = st.GetModelList("1=1 and bumname not in ('党工团','项目经理部') order by bumname desc");
                mostList = st.GetModelList("1=1 order by bumname desc");
                //若系统管理员也属于某部门

                for (int t = 0; t < mostList.Count; t++)
                {
                    DropDownList1.Items.Add(new ListItem(mostList[t].TypeName + "(" + mostList[t].BumName + ")", mostList[t].TypeID.ToString()));
                }
                DropDownList1.Items.Insert(0, new ListItem("-请选择-", "0"));
            }
            else
            {
                //若此用户不在任何部门里,则无操作
                if (tm.GetModel(ul.LoginID).m_bum == 0)
                {
                    this.Label1.Visible = true;
                }
                else
                {
                    //若是用户登录,则根据其所属部门得出相应列表信息

                    // 根据登陆ID 找到 member表里对应的m_bum部门ID,然后再找出部门名称

                    most.BumID   = tm.GetModel(ul.LoginID).m_bum.ToString().Trim();
                    most.BumName = tb.GetModel(long.Parse(most.BumID.ToString())).b_name;
                    // st.GetModelList("BumName=" + most.BumName);
                    mostList = st.GetModelList("BumName='" + most.BumName + "' or bumname in ('科室信息','总工室')");

                    for (int j = 0; j < mostList.Count; j++)
                    {
                        DropDownList1.Items.Add(new ListItem(mostList[j].TypeName + "(" + mostList[j].BumName + ")", mostList[j].TypeID.ToString()));
                    }
                    DropDownList1.Items.Insert(0, new ListItem("-请选择-", "0"));
                    //if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "党建", "党工团", false))
                    //{
                    //    ListItem li = DropDownList1.Items.FindByText("党建动态(党工团)");
                    //    ListItem li1 = DropDownList1.Items.FindByText("党务资料(党工团)");
                    //    DropDownList1.Items.Remove(li);
                    //    DropDownList1.Items.Remove(li1);
                    //}
                    //if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "工会", "党工团", false))
                    //{
                    //    ListItem li = DropDownList1.Items.FindByText("工会动态(党工团)");
                    //    ListItem li1 = DropDownList1.Items.FindByText("工会资料(党工团)");
                    //    DropDownList1.Items.Remove(li);
                    //    DropDownList1.Items.Remove(li1);
                    //}
                    //if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "团务", "党工团", false))
                    //{
                    //    ListItem li = DropDownList1.Items.FindByText("团务动态(党工团)");
                    //    ListItem li1 = DropDownList1.Items.FindByText("团务资料(党工团)");
                    //    DropDownList1.Items.Remove(li);
                    //    DropDownList1.Items.Remove(li1);
                    //}
                    if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "工程警示", "科室信息", false))
                    {
                        ListItem li = DropDownList1.Items.FindByText("工程警示(科室信息)");
                        DropDownList1.Items.Remove(li);
                    }
                    if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "先锋视野", "科室信息", false))
                    {
                        ListItem li = DropDownList1.Items.FindByText("先锋视野(科室信息)");
                        DropDownList1.Items.Remove(li);
                    }
                    if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "总工室", "科室信息", false))
                    {
                        ListItem li  = DropDownList1.Items.FindByText("技术动态(总工室)");
                        ListItem li1 = DropDownList1.Items.FindByText("技术资料(总工室)");
                        ListItem li2 = DropDownList1.Items.FindByText("技术管理(总工室)");
                        DropDownList1.Items.Remove(li);
                        DropDownList1.Items.Remove(li1);
                        DropDownList1.Items.Remove(li2);
                    }
                }
            }

            if (!string.IsNullOrEmpty(Request.QueryString["pagetitle"]))
            {
                titleId = Convert.ToInt32(Request.QueryString["pagetitle"]);
                if (titleId == 1)
                {
                    pagetitlestr = "科室信息修改";
                }
                indexId = 0;
                indexId = Convert.ToInt32(Request.QueryString["indexId"]);
                PageBind(indexId);
            }

            BindDownList();
        }
    }
示例#17
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Tunnel.Model.Tunnel_menber tm = ul.GetUserBean(ul.LoginID);
        if (!Tunnel.Data.DESEncrypt.Encrypt(spPassword.Text.Trim()).Equals(tm.m_spassword))
        {
            Tunnel.Common.Message.back("审批密码错误"); return;
        }
        else
        {
            //这里为存储当前步骤
            mtb = btb.GetModel(int.Parse(Request.Params["bid"]));
            mf  = bf.GetModel(mtb.b_sort);
            if (mtb.b_state == 3)
            {
                Tunnel.Common.Message.back("此流程己审批结束,请勿重复审批!"); return;
            }
            else
            {
                string currbid = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_nextbid", "e_gid=" + Request.Params["bid"] + " order by e_id desc");
                if ("".Equals(currbid) || "0".Equals(currbid))
                {
                    currbid = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + mtb.b_sort + " and s_num=1");
                }
                mts = bts.GetModel(Convert.ToInt32(currbid));
                int    cunum     = mts.s_num;
                bool   iscshened = true;
                int    sum       = bts.GetCount("s_lid=" + mtb.b_sort);
                string curruser  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_id=" + mts.s_id);
                if (!string.IsNullOrEmpty(curruser))
                {
                    string[] users = curruser.Split(',');
                    foreach (string user in users)
                    {
                        if (!string.IsNullOrEmpty(user))
                        {
                            if (user == ul.LoginID.ToString())
                            {
                                iscshened = false;
                            }
                        }
                    }
                }
                if (!iscshened || ul.JiaoSe(ul.LoginID) == "系统管理员")
                {
                    //将当前步骤存入数据库表:Tunnel_exam
                    Tunnel.BLL.Tunnel_exam   bte = new Tunnel.BLL.Tunnel_exam();
                    Tunnel.Model.Tunnel_exam mte = new Tunnel.Model.Tunnel_exam();
                    mte.e_bid     = Convert.ToInt32(mts.s_id);
                    mte.e_endtime = DateTime.Now;
                    mte.e_gid     = Convert.ToInt32(Request.Params["bid"]);
                    mte.e_user    = ul.LoginID;
                    string lastendtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_endtime", "e_gid=" + Request.Params["bid"] + " order by e_id desc");
                    if (!string.IsNullOrEmpty(lastendtime))
                    {
                        mte.e_time = Convert.ToDateTime(lastendtime);//取得上一步的最后执行时间
                    }
                    else
                    {
                        mte.e_time = mtb.b_time;
                    }
                    //如果为最后一步则结束流程
                    if (cunum == sum)
                    {
                        mte.e_nextbid = 0;
                        string pid = Tunnel.Common.GetValue.getDataValue("Tunnel_flow", "f_sort", "f_id=" + mtb.b_sort);
                        //插入到公司发文
                        if ("18".Equals(pid))
                        {
                            tmt.Title      = mtb.b_title;
                            tmt.TypeId     = 5;
                            tmt.HtmlSource = fc.From_Content(mtb.b_formcontent, mtb.b_content, true);//取得替换后的表单数据
                            tmt.UserId     = mtb.b_user;
                            Tunnel.BLL.Tunnel_information bllf = new Tunnel.BLL.Tunnel_information();
                            int relt = -1;
                            relt = bllf.Add(tmt);
                        }
                        Tunnel.Data.DbHelperSQL.ExecuteSql("UPDATE TUNNEL_BUMF SET B_STATE=3 WHERE B_ID=" + Request.Params["bid"]);
                        Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE TUNNEL_REMIND WHERE m_type=1 and m_bid=" + currbid + " and m_typeid=" + mtb.b_id);//删除待办事项
                        Tunnel.Common.Message.Show("流程结束成功!", "Apply_Sp.aspx");
                    }
                    else
                    {
                        string currs = "";
                        if (!"".Equals(currbid) || !"0".Equals(currbid))
                        {
                            string nid = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + mtb.b_sort + " and s_num>" + mts.s_num + " order by s_num asc");
                            currs = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_lid=" + mtb.b_sort + " and s_num>" + mts.s_num + " order by s_num asc");
                            if (string.IsNullOrEmpty(nid))
                            {
                                nid = "0";
                            }
                            mte.e_nextbid = long.Parse(nid);
                        }
                        else
                        {
                            mte.e_nextbid = 0;
                        }
                        if (!string.IsNullOrEmpty(currs))
                        {
                            Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
                            Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
                            string[] users = currs.Split(',');
                            foreach (string user in users)
                            {
                                if (!string.IsNullOrEmpty(user))
                                {
                                    tr.m_title    = mtb.b_title + "<font color=red>(待审批)</font>";
                                    tr.m_url      = "N_WorkFlow/MyApply/Apply_zSp.aspx?bid=" + mtb.b_id;
                                    tr.m_touser   = Convert.ToInt32(user);
                                    tr.m_time     = DateTime.Now;
                                    tr.m_type     = 1;
                                    tr.m_typeid   = Convert.ToInt32(mtb.b_id);
                                    tr.m_bid      = Convert.ToInt32(mte.e_nextbid);
                                    tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                                    tr.m_isread   = 0;
                                    long messge = br.Add(tr);
                                }
                            }
                        }
                    }

                    bte.Add(mte);
                    string contents = FCKeditor1.Value;
                    //添加审批意见
                    if (!string.IsNullOrEmpty(contents))
                    {
                        Tunnel.BLL.Tunnel_Advice   ta = new Tunnel.BLL.Tunnel_Advice();
                        Tunnel.Model.Tunnel_Advice ma = new Tunnel.Model.Tunnel_Advice();
                        ma.a_content = contents;
                        ma.a_bid     = Convert.ToInt32(mts.s_id);
                        ma.a_gid     = Convert.ToInt32(mtb.b_id);
                        ma.a_time    = DateTime.Now;
                        ma.a_user    = ul.LoginID;
                        string count = Tunnel.Common.GetValue.getDataValue("Tunnel_Advice", "count(*)", "a_bid=" + mf.f_id + " and a_gid=" + Request.Params["bid"]);
                        if (int.Parse(count) > 0)
                        {
                            ta.Update(ma);
                        }
                        else
                        {
                            ta.Add(ma);
                        }
                    }
                    Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE TUNNEL_REMIND WHERE m_type=1 and m_bid=" + currbid + " and m_typeid=" + mtb.b_id);//删除待办事项
                    Tunnel.Common.Message.Show("操作成功!", "Apply_Sp.aspx");
                }
                else
                {
                    Tunnel.Common.Message.back("此流程己审批通过,请勿重复审批!"); return;
                }
            }
        }
    }
示例#18
0
    private void BindDownList()
    {
        string strSQL = "";
        string strOR  = "";
        string strBum = tm.GetModel(ul.LoginID).m_bum.ToString().Trim();
        List <Tunnel.Model.Tunnel_SelType> newsType = st.GetModelList("ParentID=0 and IsDel=0");
        string sBum = "";

        for (int i = 0; i < newsType.Count; i++)
        {
            if (sBum == newsType[i].BumID)
            {
                continue;
            }
            else
            {
                string[] bums = newsType[i].BumID.Trim().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < bums.Length; j++)
                {
                    if (strBum == bums[j])
                    {
                        strOR += " BumID='" + newsType[i].BumID + "' OR";
                        break;
                    }
                }
                sBum = newsType[i].BumID;
            }
        }

        if (strOR != "")
        {
            strOR = strOR.Substring(0, strOR.Length - 2);
        }
        ddlType.Items.Clear();
        ddlType1.Items.Clear();
        List <Tunnel.Model.Tunnel_SelType> headList = new List <Tunnel.Model.Tunnel_SelType>();

        if ("系统管理员" == ul.JiaoSe(ul.LoginID))
        {
            strSQL = "ParentID=0 and IsDel=0 order by bumname desc";
        }
        else
        {
            if (strOR != "")
            {
                strSQL = string.Format("ParentID=0 and IsDel=0 AND ({0}) ORDER BY bumname desc", strOR);
            }
            else
            {
                strSQL = "1=2";
            }
        }
        //else if (tm.GetModel(ul.LoginID).m_bum == 131)
        //{
        //    strSQL = string.Format("ParentID=0 and (BumID='{0}' or BumID=0) order by bumname desc", tm.GetModel(ul.LoginID).m_bum);
        //}
        //else if (tm.GetModel(ul.LoginID).m_bum == 134)
        //{
        //    strSQL = string.Format("ParentID=0 and (BumID='{0}' or BumID=132 or BumID=0) order by bumname desc", tm.GetModel(ul.LoginID).m_bum);
        //}
        //else
        //{
        //    strSQL = string.Format("ParentID=0 and BumID='{0}' order by bumname desc", tm.GetModel(ul.LoginID).m_bum);
        //}
        headList = st.GetModelList(strSQL);
        for (int i = 0; i < headList.Count; i++)
        {
            ddlType.Items.Add(new ListItem("(" + headList[i].BumName + ") " + headList[i].TypeName, headList[i].TypeID.ToString()));
            ddlType1.Items.Add(new ListItem("(" + headList[i].BumName + ") " + headList[i].TypeName, headList[i].TypeID.ToString()));

            //List<Tunnel.Model.Tunnel_SelType> itemList = new List<Tunnel.Model.Tunnel_SelType>();
            //itemList = st.GetModelList(string.Format("ParentID={0} order by bumname desc", headList[i].TypeID));
            //for (int j = 0; j < itemList.Count; j++)
            //{
            //    DropDownList1.Items.Add(new ListItem("|-> " + itemList[j].TypeName, itemList[j].TypeID.ToString()));
            //    List<Tunnel.Model.Tunnel_SelType> list = new List<Tunnel.Model.Tunnel_SelType>();
            //    list = st.GetModelList(string.Format("ParentID={0} order by bumname desc", itemList[j].TypeID));
            //    for (int k = 0; k < list.Count; k++)
            //    {
            //        DropDownList1.Items.Add(new ListItem("|->-> " + list[k].TypeName, list[k].TypeID.ToString()));
            //    }
            //}
        }
        ddlType1.Items.Insert(0, new ListItem("全部", "0"));
    }
示例#19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["delid"]))
            {
                uid = Request.QueryString["delid"].ToString();
                if (uid != "1")
                {
                    if (ul.LoginID.ToString() != uid)
                    {
                        if (tm.Exists(Convert.ToInt32(uid)))
                        {
                            tm.Delete(Convert.ToInt64(uid));
                            if (tu.GetModelList("uy_uid='" + uid + "'").Count != 0)
                            {
                                tu.Delete(tu.GetModelList("uy_uid='" + uid + "'")[0].uy_id);
                            }
                            Tunnel.Common.Message.Show("删除成功", "tunnel_userlist.aspx");
                        }
                        else
                        {
                            Tunnel.Common.Message.Show("该用户有过重要操作记录!请勿删除!");
                        }
                    }
                    else
                    {
                        Tunnel.Common.Message.Show("不能删除自己!");
                    }
                }
                else
                {
                    Tunnel.Common.Message.Show("不能删除初始管理员");
                }
            }
            //if (ul.LoginID != 1)
            if ("系统管理员" != ul.JiaoSe(ul.LoginID))
            {
                Tunnel.Model.Tunnel_menber tmm = new Tunnel_menber();
                tmm = tbll.GetModel(ul.LoginID);
                if (!string.IsNullOrEmpty(tmm.m_bum.ToString()))
                {
                    BumID = tmm.m_bum;
                }

                TextBox1.Text = word;
                SearchWhere   = "  (m_birth like '%" + word + "%' or " +
                                "  m_idcard like '%" + word + "%' or " +
                                "  m_login like '%" + word + "%' or " +
                                "  m_mail like '%" + word + "%' or " +
                                "  m_mobile like '%" + word + "%' or " +
                                "  m_name like '%" + word + "%') and m_bum = " + BumID + " ";
                PageBind();
            }
            else
            {
                TextBox1.Text = word;
                SearchWhere   = "  m_birth like '%" + word + "%' or " +
                                "  m_idcard like '%" + word + "%' or " +
                                "  m_login like '%" + word + "%' or " +
                                "  m_mail like '%" + word + "%' or " +
                                "  m_mobile like '%" + word + "%' or " +
                                "  m_name like '%" + word + "%'";
                PageBind();
            }
        }
    }
示例#20
0
    void ShowInit(string sql)
    {
        DataSet ds = new DataSet();

        string where = "";
        string userlist = "0";

        Tunnel.BLL.Tunnel_menber bm = new Tunnel.BLL.Tunnel_menber();
        ul.UsbnLogin = bm.GetModel(ul.LoginID);
        if (Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "流程审核", "我的工作", false))
        {
            DataSet dss = new DataSet();
            if (ul.JiaoSe(ul.LoginID) != "系统管理员")
            {
                dss = bm.GetList("m_bum=" + ul.UsbnLogin.m_bum);

                foreach (DataRow dr in dss.Tables[0].Rows)
                {
                    userlist += dr["m_id"].ToString() + ",";
                }
                if (userlist.Length > 0)
                {
                    userlist = userlist.Substring(0, userlist.Length - 1);
                }
            }
            else
            {
                userlist = "0";
            }
        }
        else
        {
            userlist = "0";
        }
        if ("search".Equals(sql))
        {
            if (TextBox1.Text.Trim() != "")
            {
                where += " and b_time>='" + TextBox1.Text + "'";
            }
            if (TextBox2.Text.Trim() != "")
            {
                where += " and b_time<='" + TextBox2.Text + "'";
            }
            if (TextBox3.Text.Trim() != "")
            {
                try
                {
                    where += " and b_id=" + int.Parse(TextBox3.Text.Trim());
                }
                catch
                {
                    Tunnel.Common.Message.back("请输入正确的文号");
                }
            }
            if (TextBox4.Text.Trim() != "")
            {
                where += " and b_title like '%" + TextBox4.Text + "%'";
            }
        }
        else
        {
            where = "";
        }
        string sWhere = "";

        if (ul.JiaoSe(ul.LoginID) != "系统管理员")
        {
            sWhere = "select DISTINCT bf.b_id,bf.b_title,bf.b_sort,bf.b_time,bf.b_file,bf.b_state,bf.b_user,bf.b_suser,bf.b_stype from tunnel_bumf bf left join tunnel_exam em on bf.b_id=em.e_gid left join tunnel_step ep on em.e_nextbid=ep.s_id where (((CHARINDEX('" + ul.LoginID + ",', ep.s_zid)>=1 or ep.s_zid ='" + ul.LoginID + "') or (CHARINDEX('" + ul.LoginID + ",', em.e_nextbuser) >= 1 or em.e_nextbuser ='******')) " + where + " and bf.b_state>0) or (b_user in(" + userlist + ") or b_suser="******") order by bf.b_state asc,bf.b_time desc";
            ds     = Tunnel.Data.DbHelperSQL.Query(sWhere);
        }
        else
        {
            ds = tb.GetList("b_state>0 " + where + " order by b_state asc,b_time desc");
        }
        PagedDataSource pds = new PagedDataSource();

        pds.DataSource  = ds.Tables[0].DefaultView;//设置数据源(DataTable类型)
        pds.AllowPaging = true;
        //每页显示的行数
        //pds.PageSize = 12;
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
        pds.CurrentPageIndex     = AspNetPager1.CurrentPageIndex - 1;
        pds.PageSize             = AspNetPager1.PageSize;
        Repeater1.DataSource     = pds;
        Repeater1.DataBind();
    }