private DataGridViewModel <Dictionary <string, object> > GetDataList(CouponItemInfoQuery query)
        {
            DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >();

            if (query != null)
            {
                DbQueryResult couponsUseList = CouponHelper.GetCouponsUseList(query);
                dataGridViewModel.rows  = DataHelper.DataTableToDictionary(couponsUseList.Data);
                dataGridViewModel.total = couponsUseList.TotalRecords;
            }
            return(dataGridViewModel);
        }
Beispiel #2
0
        private void BindCoupons()
        {
            CouponItemInfoQuery couponItemInfoQuery = new CouponItemInfoQuery();

            couponItemInfoQuery.PageIndex    = this.pager.PageIndex;
            couponItemInfoQuery.PageSize     = this.pager.PageSize;
            couponItemInfoQuery.UserId       = HiContext.Current.UserId;
            couponItemInfoQuery.CouponStatus = this.typeId + 1;
            couponItemInfoQuery.SortBy       = "GetDate";
            couponItemInfoQuery.SortOrder    = SortAction.Desc;
            DbQueryResult couponsUseList = CouponHelper.GetCouponsUseList(couponItemInfoQuery);

            this.rptMyCoupons.DataSource = couponsUseList.Data;
            this.rptMyCoupons.DataBind();
            this.pager.TotalRecords = couponsUseList.TotalRecords;
        }