protected void Page_Load(object sender, EventArgs e)
 {
     XulyTruyXuatAllThongTinSanpham sanpham = new XulyTruyXuatAllThongTinSanpham();
     sanpham.Thucthi_xuattable();
     CollectionPager1.MaxPages = 1000;
     CollectionPager1.PageSize = Sosanpham;
     CollectionPager1.DataSource = sanpham.table.DefaultView;
     CollectionPager1.BindToControl = datalist1;
     datalist1.DataSource = CollectionPager1.DataSourcePaged;
     datalist1.DataBind();
 }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session.Contents["TrangThai"].ToString() == "ChuaDangNhap")
     {
         Response.Redirect("~/Admin/Dangnhapadmin.aspx");
     }
     else 
     {
         XulyTruyXuatAllThongTinSanpham sanpham = new XulyTruyXuatAllThongTinSanpham();
         sanpham.Thucthi_xuattable();
         CollectionPager1.MaxPages = 1000;
         CollectionPager1.PageSize = 12;
         CollectionPager1.DataSource = sanpham.table.DefaultView;
         CollectionPager1.BindToControl = datalist1;
         datalist1.DataSource = CollectionPager1.DataSourcePaged;
         datalist1.DataBind();
    }
 }