private void LoadList() { AdminLoaiTinController control = new AdminLoaiTinController(); List <AdminLoaiTinInfo> list = control.ListAdminLoaiTins(); if (list != null && list.Count > 0) { this.gvAdminLoaiTin.DataSource = list; int rowsCount = list.Count, pageSize = 10; int pagesCount = (int)Math.Ceiling((double)rowsCount / (double)pageSize); this.ddlChuyenToiTrang.Items.Clear(); for (int i = 1; i <= pagesCount; i++) { this.ddlChuyenToiTrang.Items.Add(new ListItem(i.ToString(), i.ToString())); } this.ddlChuyenToiTrang.SelectedIndex = this.CurrentPage - 1; } this.gvAdminLoaiTin.DataBind(); }
public List <AdminLoaiTinInfo> LoadListData() { AdminLoaiTinController control = new AdminLoaiTinController(); return(control.ListAdminLoaiTins()); }