Пример #1
0
        //根据条件分页查询
        public void BindGv(int pageSize, int pageindex)
        {
            Shwere();
            string sort              = "id";
            string order             = "DESC";
            int    currentPage       = Pager.CurrentPageIndex;
            IList <Model.Goods> list = fmcost.GetBookRoomPager(sort, order, currentPage, pageSize, stwhere);

            if (list.Count > 0)
            {
                GetListRoom(list);
            }

            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         = "&nbsp;记录总数:<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%");
                    Pager.CustomInfoHTML         = "<div class='norecord'><span>当前无记录</span></div>";
                }
            }

            return;
        }