/// <summary> /// Hàm dùng để load dữ liệu lên thành phần ListView sử dụng hàm trong class dao.HoCayThuoc_DAO.cs /// </summary> private void bindData() { DataTable dt = dao.HoCayThuoc_DAO.getAll_Hocaythuoc(); ListView_HoCayThuoc.DataSource = dt; ListView_HoCayThuoc.DataBind(); }
/// <summary> /// Sự kiện khi chuyển trang /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ListView_HoCayThuoc_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { (ListView_HoCayThuoc.FindControl("datapager1") as DataPager).SetPageProperties(e.StartRowIndex, e.MaximumRows, false); bindData();// Sử dụng để load lại dữ liệu cho ListView sau khi chuyển trang khác }