示例#1
0
        private void search_code()
        {
            if (TextBox2.Text.Trim() != "")
            {
                //only text box
                CLSearchfilters sflt      = new CLSearchfilters();
                string          criterion = shortbuildfunc().ToString();
                string          titlian   = TextBox2.Text;

                GridView1.DataSource = sflt.applytitlefilter(titlian, criterion);
                GridView1.DataBind();

                Label13.Text = "your search returned " + sflt.getsearchcounts(titlian, criterion) + " results";
            }
        }
示例#2
0
        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            System.Threading.Thread.Sleep(2000);

            if (Label13.Text.Contains("your search returned") == true)
            {
                //only text box
                CLSearchfilters sflt2 = new CLSearchfilters();

                GridView1.DataSource = sflt2.applytitlefilter(TextBox2.Text, shortbuildfunc().ToString());
                GridView1.PageIndex  = e.NewPageIndex;
                GridView1.DataBind();
            }

            else
            {
                CLMainpagepopulator mpgp = new CLMainpagepopulator();
                GridView1.DataSource = mpgp.getJobssingle();
                GridView1.PageIndex  = e.NewPageIndex;
                GridView1.DataBind();
            }
        }