private void BindReturns() { ReturnsApplyQuery returnsQuery = this.GetReturnsQuery(); DbQueryResult returnsApplys = TradeHelper.GetReturnsApplys(returnsQuery, HiContext.Current.User.UserId); this.listReturns.DataSource = returnsApplys.Data; this.listReturns.DataBind(); this.pager.TotalRecords = returnsApplys.TotalRecords; this.txtOrderId.Text = returnsQuery.OrderId; this.ddlHandleStatus.SelectedIndex = 0; if (returnsQuery.HandleStatus.HasValue && (returnsQuery.HandleStatus.Value > -1)) { this.ddlHandleStatus.SelectedValue = returnsQuery.HandleStatus.Value.ToString(); } }
private void BindReturns() { ReturnsApplyQuery returnsQuery = this.GetReturnsQuery(); returnsQuery.UserId = HiContext.Current.UserId; PageModel <ReturnInfo> returnsApplys = TradeHelper.GetReturnsApplys(returnsQuery); this.listReturns.DataSource = returnsApplys.Models; this.listReturns.DataBind(); this.pager.TotalRecords = returnsApplys.Total; this.txtOrderId.Text = (string.IsNullOrEmpty(returnsQuery.OrderId) ? returnsQuery.ProductName : returnsQuery.OrderId); if (returnsQuery.ReturnId.HasValue) { this.txtAfterSaleId.Text = returnsQuery.ReturnId.Value.ToString(); } }
private void BindReplace() { ReturnsApplyQuery returnsQuery = this.ReturnsApplyQuery(); returnsQuery.UserId = new int?(HiContext.Current.User.UserId); DbQueryResult returnsApplys = TradeHelper.GetReturnsApplys(returnsQuery); this.rptApply.DataSource = returnsApplys.Data; 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(); //} }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("售后记录"); int.TryParse(this.Page.Request.QueryString["Status"], out this.Status); this.rptUserRefunds = (AppshopTemplatedRepeater)this.FindControl("rptUserReturns"); 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; } ReturnsApplyQuery returnsApplyQuery = new ReturnsApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { returnsApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } if (int.TryParse(this.Page.Request.QueryString["Status"], out this.Status) && this.Status > -1) { returnsApplyQuery.HandleStatus = this.Status; } returnsApplyQuery.PageIndex = pageIndex; returnsApplyQuery.PageSize = pageSize; returnsApplyQuery.SortBy = "ApplyForTime"; returnsApplyQuery.SortOrder = SortAction.Desc; returnsApplyQuery.UserId = HiContext.Current.UserId; int num = 0; PageModel <ReturnInfo> returnsApplys = TradeHelper.GetReturnsApplys(returnsApplyQuery); this.rptUserRefunds.DataSource = returnsApplys.Models; this.rptUserRefunds.DataBind(); num = returnsApplys.Total; this.txtTotalPages.SetWhenIsNotNull(num.ToString()); }