Пример #1
0
        protected void BindCouponList()
        {
            //if (string.IsNullOrEmpty(this.couponName)&&
            //    string.IsNullOrEmpty(this.couponOrder)&&
            //    !this.couponstatus.HasValue&&
            //    !this.CouponId.HasValue)
            //{
            //    return;
            //}
            DbQueryResult couponsList = CouponHelper.GetCouponsList(new CouponItemInfoQuery
            {
                CounponName  = this.couponName,
                OrderId      = this.couponOrder,
                CouponId     = this.CouponId,
                UserName     = this.userName,
                AddUserName  = this.addUserName,
                BeginTime    = !this.dateStart.HasValue ? "" : this.dateStart.Value.ToString("yyyy-MM-dd HH:mm:ss"),
                EndTime      = !this.dateEnd.HasValue ? "" : (this.dateEnd.Value.ToString("yyyy-MM-dd") + " 23:59:59"),
                CouponStatus = this.couponstatus,
                PageIndex    = this.pager.PageIndex,
                PageSize     = this.pager.PageSize,
                SortBy       = "GenerateTime",
                SortOrder    = SortAction.Desc
            });

            this.pager.TotalRecords    = couponsList.TotalRecords;
            this.grdCoupons.DataSource = couponsList.Data;
            this.grdCoupons.DataBind();
        }
Пример #2
0
        protected void BindCouponList()
        {
            CouponItemInfoQuery query = new CouponItemInfoQuery {
                CounponName  = this.couponName,
                OrderId      = this.couponOrder,
                CouponStatus = this.couponstatus,
                PageIndex    = this.pager.PageIndex,
                PageSize     = this.pager.PageSize,
                SortBy       = "GenerateTime",
                SortOrder    = SortAction.Desc
            };
            DbQueryResult couponsList = CouponHelper.GetCouponsList(query);

            this.pager.TotalRecords    = couponsList.TotalRecords;
            this.grdCoupons.DataSource = couponsList.Data;
            this.grdCoupons.DataBind();
        }