public void bindData(int pageIn, string selectWhere)
        {
            BLL.eventsTb bllevent = new BLL.eventsTb();
            List<Model.eventsTb> modevent = bllevent.GetModelList(selectWhere);

            //BLL.noveltyTb bllAdmin = new BLL.noveltyTb();
            //List<Model.noveltyTb> admins = bllAdmin.GetModelList(selectWhere);
            PagedDataSource pds = new PagedDataSource();
            pds.DataSource = modevent;
            pds.PageSize = 8;
            pds.AllowPaging = true;
            pds.CurrentPageIndex = pageIn;
            this.gvSuperAdminSeeInfo.DataSource = pds;
            this.gvSuperAdminSeeInfo.DataBind();

            int pageCount = pds.PageCount;
            StringBuilder html = new StringBuilder("");
            html.Append("<a class='pageA pageStart' href='adminSeeEvents.aspx?pageInd=0'>首页</a>");
            for (int i = 0; i < pageCount; i++)
            {
                html.Append("<a class='pageA pageNum pageA" + (i + 1).ToString() + "' href='adminSeeEvents.aspx?pageInd=" + i.ToString() + "'>" + (i + 1).ToString() + "</a>");
            }
            html.Append("<a class='pageA pageStart' href='adminSeeEvents.aspx?pageInd=" + (pageCount - 1).ToString() + "'>尾页</a>");
            this.dgvpage.InnerHtml = html.ToString();

            ScriptManager.RegisterStartupScript(searchBtn, this.GetType(), "clickPage", "clickPage(" + (pageIn + 1).ToString() + ");", true);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     int operatorIDs = Convert.ToInt32(Request.QueryString["EventsID"]);
     BLL.eventsTb bllevent = new BLL.eventsTb();
     Model.eventsTb modevent = bllevent.GetModel(operatorIDs);
     this.labelContent.Text = modevent.operateContent ;
     this.labelID.Text = modevent.ID .ToString ();
     this.labelTime.Text = modevent.operateTime.ToString();
     BLL.userTb bllUser = new BLL.userTb();
     Model.userTb user = bllUser.GetModel(modevent .operatorID );
     this.labelSenderName.Text = user.userName;
     this.labelType.Text = modevent.operateAction;
     this.userImgs .InnerHtml  ="<img src='"+user.headImgUrl+"' />";
     this.labeloperatorID.Text = user.userID.ToString ();
 }
        protected void loginBtn1_Click(object sender, EventArgs e)
        {
            string email = this.textEmailT.Text.ToString();
            string pwd = this.textPasswordT.Text.ToString();
            BLL.userTb blluser = new BLL.userTb();
            if (email == "" || pwd == "")
            {
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>alert('邮箱与密码不能为空,请重新输入!');</script>",false  );
                return;
            }

            List<Model.userTb> moduser = blluser.GetModelList("userEmail='" + email + "'");
            foreach (Model.userTb moduser1 in  moduser ){
                if (moduser1.state == "0")
                {

                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>alert('您的账号已经被封号!');</script>", false );
                }
                else
                {
                    if (moduser1.userPwd != pwd)
                    {

                        Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>alert('邮箱与密码不匹配,请重新输入!');</script>",false );
                        //this.textEmailT.Text = "";
                        this.textPasswordT.Text = "";
                        return;
                    }

                    Model.eventsTb modevent = new Model.eventsTb();
                    BLL.eventsTb bllevent = new BLL.eventsTb();
                    modevent.operatorID = moduser[0].userID;
                    modevent.operateAction = "用户登陆";
                    modevent.operateContent = "用户登陆成功";
                    modevent.operateTime = System.DateTime.Now.ToLocalTime();
                    bllevent.Add(modevent);

                    Session["no"] = email;
                    Session["pwd"] = pwd;

                    Response.Redirect("userHome.aspx");

                }
            }
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>alert('账号不存在,请重新输入!');</script>", false);
            this.textEmailT.Text = "";
            this.textPasswordT.Text = "";
        }
        protected void search_Click(object sender, EventArgs e)
        {
            //Response.Write("<Script type='text/javascript'>alert( this.dgvpage.InnerHtml);</Script>");
            string searchT = this.searchText.Text;
            if (searchT == "")
            {
                ScriptManager.RegisterStartupScript(searchBtn, this.GetType(), "showErrorAlert", "showErrorAlert('请输入关键字!');", true);
                return;
            }
            try
            {
                BLL.eventsTb bllevents = new BLL.eventsTb();
                List<Model.eventsTb> modevents = bllevents.GetModelList("ID like '%" + searchT + "%' and operatorID!=1 and operateContent like '用户%'");
                if (modevents.Count == 0)
                {
                    ScriptManager.RegisterStartupScript(searchBtn, this.GetType(), "showNoticeAlert", "showNoticeAlert('没有您要找的新鲜事!');", true);
                    return;
                }
                bindData(0, "ID like '%" + searchT + "%' and operatorID!=1 and operateContent like '用户%'");
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(searchBtn, this.GetType(), "showErrorAlert", "showErrorAlert('发生错误,请重新输入关键字!');", true);

            }
        }