public void Load_list() { try { int _sotin = 20; if (_txt == "Từ khóa tìm kiếm") { _txt = ""; } else { if (!_txt.Contains("%")) { _txt = "%" + _txt + "%"; } } var _vNews = search.Load_search_result(_txt, 1, _catid); if (_vNews.Count > 0) { if (_page != 0) { Rpproduct.DataSource = _vNews.Skip(_sotin * _page - _sotin).Take(_sotin); Rpproduct.DataBind(); } else { Rpproduct.DataSource = _vNews.Take(_sotin); Rpproduct.DataBind(); } //ltrPage.Text = change.result(_vNews.ToList().Count, _sotin, _txt, _catid,"", _page, 2); } Hdcount.Value = _vNews.Count.ToString(); } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } }
//public void Load_listBill() //{ // try // { // if (_code == "") // { // _code = ""; // } // else // { // //if (!_txt.Contains("%")) // // _code = "%" + _code + "%"; // } // DataTable dt = _CheckBill.LoadTrackAndTrace("001", "tnt", "24hexpress", _code, ""); // GridView1.DataSource = dt; // GridView1.DataBind(); // } // catch (Exception ex) // { // clsVproErrorHandler.HandlerError(ex); // } //} //protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) //{ // GridView1.PageIndex = e.NewPageIndex; // Load_listBill(); //} #region Loadsearch public void Load_list() { try { int _sotin = 12; if (!_txt.Contains("%")) { _txt = "%" + _txt + "%"; } int _cat_sreach = 0; if (_catid != 0) { _cat_sreach = _catid; } if (_catid_child != 0) { _cat_sreach = _catid_child; } var _vNews = search.Load_search_result(_txt, 1, _cat_sreach); if (_vNews.ToList().Count > 0) { if (_page != 0) { Rpproduct.DataSource = _vNews.Skip(_sotin * _page - _sotin).Take(_sotin); Rpproduct.DataBind(); } else { Rpproduct.DataSource = _vNews.Take(_sotin); Rpproduct.DataBind(); } ltrPage.Text = change.result(_vNews.ToList().Count, _sotin, _txt, _page, 2, 10); } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } }
public void Load_list() { try { int _sotin = 25; if (_txt == "Input search…") { _txt = ""; } else { if (!_txt.Contains("%")) { _txt = "%" + _txt + "%"; } } var _vNews = search.Load_search_result(_txt, -1); if (_vNews.ToList().Count > 0) { if (_page != 0) { rptlistnews.DataSource = _vNews.Skip(_sotin * _page - _sotin).Take(_sotin); rptlistnews.DataBind(); } else { rptlistnews.DataSource = _vNews.Take(_sotin); rptlistnews.DataBind(); } ltrPage.Text = change.result(_vNews.ToList().Count, _sotin, _txt, 0, _page, 2); } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } }
public void Load_list() { try { int _sotin = 24; //if (_txt == "Tìm kiếm sản phẩm") //{ // _txt = ""; //} //else //{ // if (!_txt.Contains("%")) // _txt = "%" + _txt + "%"; //} var _vNews = search.Load_search_result(_txt, 1, _catid); if (_vNews.ToList().Count > 0) { if (_page != 0) { Rpproduct.DataSource = _vNews.Skip(_sotin * _page - _sotin).Take(_sotin); Rpproduct.DataBind(); } else { Rpproduct.DataSource = _vNews.Take(_sotin); Rpproduct.DataBind(); } ltrPage.Text = change.result(_vNews.ToList().Count, _sotin, _txt, _catid, "", _page, 2); } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } }