protected void btn_Result_Click(object sender, EventArgs e) { Freight freight = new Freight(); freight.Freight_name = "%" + this.txt_Name.Text + "%"; FreightProvider provider = new FreightProvider(); this.ListPager1.RecordCount = provider.GetSize(freight); this.BindSource(0, "%" + this.txt_Name.Text + "%"); this.ListPager1.PageChange += new PagerEventHandler(ListPager1_PageChange); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FreightProvider provider = new FreightProvider(); this.ListPager1.RecordCount = provider.GetSize(); this.BindSource(0, null); } this.account.Text = Session["LOGINED"].ToString(); this.datetime.Text = this.BindDayWeek(); this.ListPager1.PageChange += new PagerEventHandler(ListPager1_PageChange); }