Example #1
0
        void BindData()
        {
            GiftQuery query = new GiftQuery();

            query.Name           = Globals.HtmlEncode(giftName);
            query.Page.PageSize  = pager.PageSize;
            query.Page.PageIndex = pager.PageIndex;
            query.Page.SortBy    = grdGift.SortOrderBy;
            if (grdGift.SortOrder.ToLower() == "desc")
            {
                query.Page.SortOrder = SortAction.Desc;
            }
            DbQueryResult abstroGiftsById = SubsiteGiftHelper.GetAbstroGiftsById(query);

            grdGift.DataSource = abstroGiftsById.Data;
            grdGift.DataBind();
            pager.TotalRecords  = abstroGiftsById.TotalRecords;
            pager1.TotalRecords = abstroGiftsById.TotalRecords;
        }
Example #2
0
        private void BindData()
        {
            GiftQuery giftQuery = new GiftQuery();

            giftQuery.Name           = Globals.HtmlEncode(this.giftName);
            giftQuery.IsPromotion    = this.isPromotion;
            giftQuery.Page.PageSize  = this.pager.PageSize;
            giftQuery.Page.PageIndex = this.pager.PageIndex;
            giftQuery.Page.SortBy    = this.grdGift.SortOrderBy;
            if (this.grdGift.SortOrder.ToLower() == "desc")
            {
                giftQuery.Page.SortOrder = SortAction.Desc;
            }
            DbQueryResult abstroGiftsById = SubsiteGiftHelper.GetAbstroGiftsById(giftQuery);

            this.grdGift.DataSource = abstroGiftsById.Data;
            this.grdGift.DataBind();
            this.pager.TotalRecords  = abstroGiftsById.TotalRecords;
            this.pager1.TotalRecords = abstroGiftsById.TotalRecords;
        }