/// <summary> /// 绑定信息 /// </summary> private void Bind(int pageSize, int pageindex, string where) { string sort = "ga_zffs_id"; string order = "DESC"; int currentPage = Pager.CurrentPageIndex; this.rep1.DataSource = gaBll.GetMethPayMoneyPage(sort, order, currentPage, pageSize, where); this.rep1.DataBind(); //Pager.RecordCount = gaBll.GetRecordCount(where); //Pager.ShowCustomInfoSection = Wuqi.Webdiyer.ShowCustomInfoSection.Right; //Pager.PageSize = pageSize; //Pager.CurrentPageIndex = pageindex; //if (Pager != null) //{ // if (Pager.RecordCount != 0) // { // Pager.ShowPageIndex = true; // Pager.ShowDisabledButtons = true; // Pager.CustomInfoSectionWidth = new System.Web.UI.WebControls.Unit("40%"); // Pager.ShowPageIndexBox = Wuqi.Webdiyer.ShowPageIndexBox.Always; // Pager.CustomInfoHTML = " 记录总数:<b>" + Pager.RecordCount.ToString() + "</b>"; // Pager.CustomInfoHTML += " 总页数:<b>" + Pager.PageCount.ToString() + "</b>"; // Pager.CustomInfoHTML += " 当前页:<font color=\"red\"><b>" + Pager.CurrentPageIndex.ToString() + "</b></font>"; // } // else // { // Pager.ShowPageIndex = false; // Pager.ShowDisabledButtons = false; // Pager.ShowPageIndexBox = Wuqi.Webdiyer.ShowPageIndexBox.Never; // Pager.CustomInfoSectionWidth = new System.Web.UI.WebControls.Unit("100%"); // } //} }
//明细数据分页 public void GridView2DataBind(int pageSize, int pageindex) { string sort = "ga_zffs_id"; string order = "DESC"; stwhere(); int currentPage = Pager.CurrentPageIndex; IList <Model.goods_account> listga = gaBll.GetMethPayMoneyPage(sort, order, currentPage, pageSize, strWheres + " and ga_zffs_id!=10"); foreach (Model.goods_account item in listga) { if (item.ga_roomNumber == null || item.ga_roomNumber == "") { if (item.Ga_Account != null && item.Ga_Account != "") { BLL.customer bllcus = new BLL.customer(); item.ga_roomNumber = bllcus.GetAccounts(item.Ga_Account).cName; } } } GridView2.DataSource = listga; GridView2.DataBind(); Pager.RecordCount = gaBll.GetRecordCount(strWheres + " and ga_price!='0' and ga_isjz=0 and ga_Type!=111 and ga_zffs_id!=11 and ga_zffs_id!=10"); Pager.ShowCustomInfoSection = Wuqi.Webdiyer.ShowCustomInfoSection.Right; Pager.PageSize = pageSize; Pager.CurrentPageIndex = pageindex; if (Pager != null) { if (Pager.RecordCount != 0) { Pager.ShowPageIndex = true; Pager.ShowDisabledButtons = true; Pager.CustomInfoSectionWidth = new System.Web.UI.WebControls.Unit("40%"); Pager.ShowPageIndexBox = Wuqi.Webdiyer.ShowPageIndexBox.Always; Pager.CustomInfoHTML = " 记录总数:<b>" + Pager.RecordCount.ToString() + "</b>"; Pager.CustomInfoHTML += " 总页数:<b>" + Pager.PageCount.ToString() + "</b>"; Pager.CustomInfoHTML += " 当前页:<font color=\"red\"><b>" + Pager.CurrentPageIndex.ToString() + "</b></font>"; } else { Pager.ShowPageIndex = false; Pager.ShowDisabledButtons = false; Pager.ShowPageIndexBox = Wuqi.Webdiyer.ShowPageIndexBox.Never; Pager.CustomInfoSectionWidth = new System.Web.UI.WebControls.Unit("100%"); } } return; }