private void BindRefund()
        {
            RefundApplyQuery refundQuery  = this.GetRefundQuery();
            DbQueryResult    refundApplys = TradeHelper.GetRefundApplys(refundQuery, HiContext.Current.User.UserId);

            this.listRefunds.DataSource = refundApplys.Data;
            this.listRefunds.DataBind();
            this.pager.TotalRecords            = refundApplys.TotalRecords;
            this.txtOrderId.Text               = refundQuery.OrderId;
            this.ddlHandleStatus.SelectedIndex = 0;
            if (refundQuery.HandleStatus.HasValue && refundQuery.HandleStatus.Value > -1)
            {
                this.ddlHandleStatus.SelectedValue = refundQuery.HandleStatus.Value.ToString();
            }
        }
Exemple #2
0
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("退款记录");
            int.TryParse(this.Page.Request.QueryString["Status"], out this.Status);
            this.rptUserRefunds = (AppshopTemplatedRepeater)this.FindControl("rptUserRefunds");
            this.rptUserRefunds.ItemDataBound += this.rptUserRefunds_ItemDataBound;
            this.txtTotalPages = (HtmlInputHidden)this.FindControl("txtTotal");
            int pageIndex = default(int);

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize = default(int);

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 20;
            }
            RefundApplyQuery refundApplyQuery = new RefundApplyQuery();

            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"]))
            {
                refundApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]);
            }
            if (int.TryParse(this.Page.Request.QueryString["Status"], out this.Status) && this.Status > -1)
            {
                refundApplyQuery.HandleStatus = this.Status;
            }
            refundApplyQuery.PageIndex = pageIndex;
            refundApplyQuery.PageSize  = pageSize;
            refundApplyQuery.SortBy    = "ApplyForTime";
            refundApplyQuery.SortOrder = SortAction.Desc;
            refundApplyQuery.UserId    = HiContext.Current.UserId;
            int num = 0;
            PageModel <RefundModel> refundApplys = TradeHelper.GetRefundApplys(refundApplyQuery);

            this.rptUserRefunds.DataSource = refundApplys.Models;
            this.rptUserRefunds.DataBind();
            num = refundApplys.Total;
            this.txtTotalPages.SetWhenIsNotNull(num.ToString());
        }
Exemple #3
0
        private void BindRefund()
        {
            RefundApplyQuery refundQuery = this.GetRefundQuery();

            refundQuery.UserId = HiContext.Current.UserId;
            PageModel <RefundModel> refundApplys = TradeHelper.GetRefundApplys(refundQuery);

            this.RefundList.DataSource = refundApplys.Models;
            this.RefundList.DataBind();
            this.pager.TotalRecords = refundApplys.Total;
            this.txtOrderId.Value   = refundQuery.OrderId;
            if (refundQuery.RefundId.HasValue)
            {
                this.txtAfterSaleId.Text = refundQuery.RefundId.Value.ToString();
            }
            if (refundQuery.HandleStatus.HasValue && refundQuery.HandleStatus.Value > -1)
            {
                this.handleStatus.SelectedValue = refundQuery.HandleStatus.Value;
            }
        }
        private void BindRefund()
        {
            RefundApplyQuery refundQuery = this.GetRefundQuery();

            refundQuery.UserId = new int?(HiContext.Current.User.UserId);
            //DbQueryResult refundApplys = TradeHelper.GetRefundApplys(refundQuery);
            //this.rptApply.DataSource = refundApplys.Data;

            TradeHelper.GetRefundApplys(refundQuery);
            this.rptApply.DataSource = TradeHelper.NewGetRefundApplys(refundQuery);
            this.rptApply.DataBind();

            //this.pager.TotalRecords = refundApplys.TotalRecords;
            //this.txtOrderId.Value = refundQuery.OrderId;
            //this.handleStatus.SelectedIndex = 0;
            //if (refundQuery.HandleStatus.HasValue && refundQuery.HandleStatus.Value > -1)
            //{
            //    this.handleStatus.Value = refundQuery.HandleStatus.Value.ToString();
            //}
        }