コード例 #1
0
ファイル: Default.aspx.cs プロジェクト: starckgates/ForSearch
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void bindData()
        {
            //每页显示像素
            int myPageSize = 10;

            DoCookie.doCook("myPageSize", myPageSize.ToString());
            string keyword = tbSearch.Text.ToString();
            int    start   = (page_index - 1) * myPageSize;

            if (Session["escount"] != null)
            {
                count = (int)Session["escount"];
            }
            if (count >= 760)
            {
                pager.Page_Count = "760";
            }
            else
            {
                pager.Page_Count = count.ToString();
            }
            lbCount.Text    = ThousandPoints.tPoints(count);
            pager.Text_Type = "CN";
            pager.Get_URL();

            //INewsBaseService inbs = new NewsBaseService();
            List <NewsBase> list = inbs.GetList(keyword, start, myPageSize);

            RpNews.DataSource = list;
            RpNews.DataBind();
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "myscript", "<script>shownews()</script>");
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "myscript", "<script>hei()</script>");
        }
コード例 #2
0
        private void bindData(string type)
        {
            int myPageSize = 10;

            DoCookie.doCook("myPageSize", myPageSize.ToString());
            kw = tb1.Text.ToString();
            int start = (page_index - 1) * myPageSize;

            if (Session["escount"] != null)
            {
                count = (int)Session["escount"];
            }
            if (count >= 760)
            {
                memPager.Page_Count = "760";
            }
            else
            {
                memPager.Page_Count = count.ToString();
            }
            lbCount.Text       = ThousandPoints.tPoints(count);
            memPager.Text_Type = "CN";
            memPager.Get_URL();
            List <Model.Member> list = ims.GetList(kw, type, start, myPageSize);

            RpMem.DataSource = list;
            RpMem.DataBind();
        }
コード例 #3
0
ファイル: Default.aspx.cs プロジェクト: starckgates/ForSearch
        /// <summary>
        /// URLName数据绑定
        /// </summary>
        private void bindUrlData()
        {
            //string keyword = tbSearch.Text.ToString();
            //int size = int.Parse(ddlSize.SelectedItem.Text);
            //int start = 0;
            //lbCount.Text = ThousandPoints.tPoints(count);
            int myPageSize = 10;

            DoCookie.doCook("myPageSize", myPageSize.ToString());
            string keyword = tbSearch.Text.ToString();
            int    start   = (page_index - 1) * myPageSize;

            if (Session["escount"] != null)
            {
                count = (int)Session["escount"];
            }
            if (count >= 760)
            {
                pager.Page_Count = "760";
            }
            else
            {
                pager.Page_Count = count.ToString();
            }
            lbCount.Text    = ThousandPoints.tPoints(count);
            pager.Text_Type = "CN";
            pager.Get_URL();
            List <URLName> list = iuns.GetList(keyword, start, myPageSize);

            RpUrlName.DataSource = list;
            RpUrlName.DataBind();
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "myscript", "<script>showurlname()</script>");
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "myscript", "<script>hei()</script>");
        }