protected override void AttachChildControls() { this.orderId = this.Page.Request.QueryString["orderId"]; this.litShipTo = (Literal) this.FindControl("litShipTo"); this.litPhone = (Literal) this.FindControl("litPhone"); this.litAddress = (Literal) this.FindControl("litAddress"); this.litOrderId = (Literal) this.FindControl("litOrderId"); this.litOrderDate = (Literal) this.FindControl("litOrderDate"); this.litOrderStatus = (OrderStatusLabel) this.FindControl("litOrderStatus"); this.rptOrderProducts = (VshopTemplatedRepeater) this.FindControl("rptOrderProducts"); this.litTotalPrice = (Literal) this.FindControl("litTotalPrice"); this.litPayTime = (Literal) this.FindControl("litPayTime"); this.orderStatus = (HtmlInputHidden) this.FindControl("orderStatus"); this.txtOrderId = (HtmlInputHidden) this.FindControl("txtOrderId"); this.litRemark = (Literal) this.FindControl("litRemark"); this.litShipToDate = (Literal) this.FindControl("litShipToDate"); this.litShippingCost = (Literal) this.FindControl("litShippingCost"); this.litCounponPrice = (Literal) this.FindControl("litCounponPrice"); this.litBuildPrice = (Literal) this.FindControl("litBuildPrice"); this.litDisCountPrice = (Literal) this.FindControl("litDisCountPrice"); this.litActualPrice = (Literal) this.FindControl("litActualPrice"); OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId); if (orderInfo == null) { base.GotoResourceNotFound("此订单已不存在"); } this.litShipTo.Text = orderInfo.ShipTo; this.litPhone.Text = orderInfo.CellPhone; this.litAddress.Text = orderInfo.ShippingRegion + orderInfo.Address; this.litOrderId.Text = this.orderId; this.litOrderDate.Text = orderInfo.OrderDate.ToString(); this.litTotalPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2")); this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus; this.litPayTime.SetWhenIsNotNull(orderInfo.PayDate.HasValue ? orderInfo.PayDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""); this.orderStatus.SetWhenIsNotNull(((int) orderInfo.OrderStatus).ToString()); this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString()); this.litCounponPrice.SetWhenIsNotNull(orderInfo.CouponValue.ToString("F2")); this.litShippingCost.SetWhenIsNotNull(orderInfo.AdjustedFreight.ToString("F2")); this.litShipToDate.SetWhenIsNotNull(orderInfo.ShipToDate); this.litBuildPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2")); this.litDisCountPrice.SetWhenIsNotNull(orderInfo.AdjustedDiscount.ToString("F2")); this.litActualPrice.SetWhenIsNotNull(orderInfo.TotalPrice.ToString("F2")); this.litRemark.SetWhenIsNotNull(orderInfo.Remark); this.rptOrderProducts.DataSource = orderInfo.LineItems.Values; this.rptOrderProducts.DataBind(); PageTitle.AddSiteNameTitle("订单详情"); }
protected override void AttachChildControls() { this.orderId = this.Page.Request.QueryString["orderId"]; this.litOrderId = (Literal) this.FindControl("litOrderId"); this.lbltotalPrice = (FormatedMoneyLabel) this.FindControl("lbltotalPrice"); this.litAddDate = (FormatedTimeLabel) this.FindControl("litAddDate"); this.lblOrderStatus = (OrderStatusLabel) this.FindControl("lblOrderStatus"); this.litCloseReason = (Literal) this.FindControl("litCloseReason"); this.litRemark = (Literal) this.FindControl("litRemark"); this.litShipTo = (Literal) this.FindControl("litShipTo"); this.litRegion = (Literal) this.FindControl("litRegion"); this.litAddress = (Literal) this.FindControl("litAddress"); this.litZipcode = (Literal) this.FindControl("litZipcode"); this.litEmail = (Literal) this.FindControl("litEmail"); this.litPhone = (Literal) this.FindControl("litPhone"); this.litTellPhone = (Literal) this.FindControl("litTellPhone"); this.litUserName = (Literal) this.FindControl("litUserName"); this.litUserAddress = (Literal) this.FindControl("litUserAddress"); this.litUserEmail = (Literal) this.FindControl("litUserEmail"); this.litUserPhone = (Literal) this.FindControl("litUserPhone"); this.litUserTellPhone = (Literal) this.FindControl("litUserTellPhone"); this.litUserQQ = (Literal) this.FindControl("litUserQQ"); this.litUserMSN = (Literal) this.FindControl("litUserMSN"); this.litPaymentType = (Literal) this.FindControl("litPaymentType"); this.litModeName = (Literal) this.FindControl("litModeName"); this.plOrderOption = (Panel) this.FindControl("plOrderOption"); this.grdOrderOption = (GridView) this.FindControl("grdOrderOption"); this.plOrderSended = (Panel) this.FindControl("plOrderSended"); this.litRealModeName = (Literal) this.FindControl("litRealModeName"); this.litShippNumber = (Literal) this.FindControl("litShippNumber"); this.litDiscountName = (HyperLink) this.FindControl("litDiscountName"); this.lblAdjustedDiscount = (FormatedMoneyLabel) this.FindControl("lblAdjustedDiscount"); this.litFreeName = (HyperLink) this.FindControl("litFreeName"); this.plExpress = (Panel) this.FindControl("plExpress"); this.power = (HtmlAnchor) this.FindControl("power"); this.orderItems = (Common_OrderManage_OrderItems) this.FindControl("Common_OrderManage_OrderItems"); this.grdOrderGift = (GridView) this.FindControl("grdOrderGift"); this.plOrderGift = (Panel) this.FindControl("plOrderGift"); this.lblCartMoney = (FormatedMoneyLabel) this.FindControl("lblCartMoney"); this.litPoints = (Literal) this.FindControl("litPoints"); this.litWeight = (Literal) this.FindControl("litWeight"); this.litFree = (Literal) this.FindControl("litFree"); this.lblFreight = (FormatedMoneyLabel) this.FindControl("lblFreight"); this.lblPayCharge = (FormatedMoneyLabel) this.FindControl("lblPayCharge"); this.lblOptionPrice = (FormatedMoneyLabel) this.FindControl("lblOptionPrice"); this.litCouponValue = (Literal) this.FindControl("litCouponValue"); this.lblDiscount = (FormatedMoneyLabel) this.FindControl("lblDiscount"); this.litTotalPrice = (FormatedMoneyLabel) this.FindControl("litTotalPrice"); this.plRefund = (Panel) this.FindControl("plRefund"); this.lblTotalBalance = (FormatedMoneyLabel) this.FindControl("lblTotalBalance"); this.litRefundOrderRemark = (Literal) this.FindControl("litRefundOrderRemark"); PageTitle.AddTitle("订单详细页", HiContext.Current.Context); if (!this.Page.IsPostBack) { OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId); this.BindOrderBase(orderInfo); this.BindOrderAddress(orderInfo); this.BindOrderItems(orderInfo); this.BindOrderRefund(orderInfo); } }
protected override void AttachChildControls() { if (string.IsNullOrEmpty(this.Page.Request.QueryString["orderId"])) { base.GotoResourceNotFound(); } this.orderId = this.Page.Request.QueryString["orderId"]; this.orderItems = (Common_OrderManage_ReviewsOrderItems) this.FindControl("Common_OrderManage_ReviewsOrderItems"); this.litWeight = (Literal) this.FindControl("litWeight"); this.litOrderId = (Literal) this.FindControl("litOrderId"); this.lbltotalPrice = (FormatedMoneyLabel) this.FindControl("lbltotalPrice"); this.litAddDate = (FormatedTimeLabel) this.FindControl("litAddDate"); this.lblOrderStatus = (OrderStatusLabel) this.FindControl("lblOrderStatus"); this.litCloseReason = (Literal) this.FindControl("litCloseReason"); this.btnRefer = ButtonManager.Create(this.FindControl("btnRefer")); this.btnRefer.Click += new EventHandler(this.btnRefer_Click); if (!this.Page.IsPostBack && ((HiContext.Current.User.UserRole == UserRole.Member) || (HiContext.Current.User.UserRole == UserRole.Underling))) { this.btnRefer.Text = "提交评论"; OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId); this.BindOrderItems(orderInfo); this.BindOrderBase(orderInfo); } }