Пример #1
0
 protected override void AttachChildControls()
 {
     this.orderId = base.GetParameter("orderId", false);
     this.litFightGroupStatusLabel = (FightGroupStatusLabel)this.FindControl("litFightGroupStatusLabel");
     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.litShipToDate       = (Literal)this.FindControl("litShipToDate");
     this.litPaymentType      = (Literal)this.FindControl("litPaymentType");
     this.litModeName         = (Literal)this.FindControl("litModeName");
     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.litTakeCode                = (Literal)this.FindControl("litTakeCode");
     this.litStoreInfo               = (Literal)this.FindControl("litStoreInfo");
     this.litStoreName               = (Literal)this.FindControl("litStoreName");
     this.litStoreTel                = (Literal)this.FindControl("litStoreTel");
     this.divstoreinfo               = (HtmlGenericControl)this.FindControl("divstoreinfo");
     this.divInvoiceTitle            = (HtmlGenericControl)this.FindControl("divInvoiceTitle");
     this.divInvoiceTaxpayerNumber   = (HtmlGenericControl)this.FindControl("divInvoiceTaxpayerNumber");
     this.divTax                     = (HtmlGenericControl)this.FindControl("divTax");
     this.listOrders                 = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
     this.orderGifts                 = (Common_OrderManage_OrderGifts)this.FindControl("Common_OrderManage_OrderGifts");
     this.plOrderGift                = (Panel)this.FindControl("plOrderGift");
     this.lblBundlingPrice           = (Literal)this.FindControl("lblBundlingPrice");
     this.litPoints                  = (Literal)this.FindControl("litPoints");
     this.litSentTimesPointPromotion = (HyperLink)this.FindControl("litSentTimesPointPromotion");
     this.litWeight                  = (Literal)this.FindControl("litWeight");
     this.litFree                    = (Literal)this.FindControl("litFree");
     this.lblFreight                 = (FormatedMoneyLabel)this.FindControl("lblFreight");
     this.litCouponValue             = (Literal)this.FindControl("litCouponValue");
     this.litPointMoney              = (Literal)this.FindControl("litPointMoney");
     this.lblDiscount                = (FormatedMoneyLabel)this.FindControl("lblDiscount");
     this.litTotalPrice              = (FormatedMoneyLabel)this.FindControl("litTotalPrice");
     this.lblRefundTotal             = (FormatedMoneyLabel)this.FindControl("lblRefundTotal");
     this.litAddOrderDate            = (FormatedTimeLabel)this.FindControl("litAddOrderDate");
     this.litPayDate                 = (FormatedTimeLabel)this.FindControl("litPayDate");
     this.litPayBack                 = (FormatedTimeLabel)this.FindControl("litPayBack");
     this.litBackShip                = (FormatedTimeLabel)this.FindControl("litBackShip");
     this.litShipDate                = (FormatedTimeLabel)this.FindControl("litShipDate");
     this.litResultDate              = (FormatedTimeLabel)this.FindControl("litResultDate");
     this.lkbtnConfirmOrder          = (LinkButton)this.FindControl("lkbtnConfirmOrder");
     this.lkbtnCloseOrder            = (LinkButton)this.FindControl("lkbtnCloseOrder");
     this.hidExpressCompanyName      = (HiddenField)this.FindControl("hidExpressCompanyName");
     this.hidShipOrderNumber         = (HiddenField)this.FindControl("hidShipOrderNumber");
     this.hidHiPOSTakeCode           = (HiddenField)this.FindControl("hidHiPOSTakeCode");
     this.btnPay                     = (Button)this.FindControl("btnPay");
     this.lbRefundMoney              = (Label)this.FindControl("lbRefundMoney");
     this.lbRefundMoney              = (Label)this.FindControl("lbRefundMoney");
     this.lbCloseReason              = (Label)this.FindControl("lbCloseReason");
     this.txtRemark                  = (TextBox)this.FindControl("txtRemark");
     this.txtReturnRemark            = (TextBox)this.FindControl("txtReturnRemark");
     this.txtReplaceRemark           = (TextBox)this.FindControl("txtReplaceRemark");
     this.dropRefundType             = (RefundTypeDropDownList)this.FindControl("dropRefundType");
     this.dropReturnRefundType       = (RefundTypeDropDownList)this.FindControl("dropReturnRefundType");
     this.dropPayType                = (DropDownList)this.FindControl("dropPayType");
     this.plRefund                   = (Panel)this.FindControl("plRefund");
     this.lblTotalBalance            = (FormatedMoneyLabel)this.FindControl("lblTotalBalance");
     this.litRefundOrderRemark       = (Literal)this.FindControl("litRefundOrderRemark");
     this.litInvoiceTitle            = (Literal)this.FindControl("litInvoiceTitle");
     this.litInvoiceTaxpayerNumber   = (Literal)this.FindControl("litInvoiceTaxpayerNumber");
     this.litTax                     = (FormatedMoneyLabel)this.FindControl("litTax");
     this.hdorderId                  = (HtmlInputHidden)this.FindControl("hdorderId");
     this.lkbtnApplyForRefund        = (HtmlAnchor)this.FindControl("lkbtnApplyForRefund");
     this.lkbtnUserRealNameVerify    = (HtmlAnchor)this.FindControl("lkbtnUserRealNameVerify");
     this.hidPreSaleId               = (HiddenField)this.FindControl("hidPreSaleId");
     this.hidIsPayDeposit            = (HiddenField)this.FindControl("hidIsPayDeposit");
     this.hidIsPaymentStore          = (HiddenField)this.FindControl("hidIsPaymentStore");
     this.litDepositPayDate          = (FormatedTimeLabel)this.FindControl("litDepositPayDate");
     this.litFinalPamentPayDate      = (Literal)this.FindControl("litFinalPamentPayDate");
     this.lblDeposit                 = (FormatedMoneyLabel)this.FindControl("lblDeposit");
     this.lblFinalPayment            = (FormatedMoneyLabel)this.FindControl("lblFinalPayment");
     this.litGetGoodsRemark          = (Literal)this.FindControl("litGetGoodsRemark");
     this.divPickUpRemark            = (HtmlGenericControl)this.FindControl("divPickUpRemark");
     this.litBalanceAmount           = (Literal)this.FindControl("litBalanceAmount");
     this.hidExpressStatus           = (HtmlInputHidden)this.FindControl("hidExpressStatus");
     this.litInvoiceType             = (Literal)this.FindControl("litInvoiceType");
     this.litRegisterAddress         = (Literal)this.FindControl("litRegisterAddress");
     this.litRegisterTel             = (Literal)this.FindControl("litRegisterTel");
     this.litOpenBank                = (Literal)this.FindControl("litOpenBank");
     this.litBankName                = (Literal)this.FindControl("litBankName");
     this.litReceiveName             = (Literal)this.FindControl("litReceiveName");
     this.litReceiveMobbile          = (Literal)this.FindControl("litReceiveMobbile");
     this.litReceiveEmail            = (Literal)this.FindControl("litReceiveEmail");
     this.litReceiveRegionName       = (Literal)this.FindControl("litReceiveRegionName");
     this.litReceiveAddress          = (Literal)this.FindControl("litReceiveAddress");
     this.listOrders.ItemDataBound  += this.orderItems_ItemDataBound;
     PageTitle.AddTitle("订单详细页", HiContext.Current.Context);
     this.order = TradeHelper.GetOrderInfo(this.orderId);
     this.divInvoiceTitle.Visible          = (this.order.Tax > decimal.Zero && !string.IsNullOrEmpty(this.order.InvoiceTitle));
     this.divInvoiceTaxpayerNumber.Visible = (this.order.Tax > decimal.Zero && !string.IsNullOrEmpty(this.order.InvoiceTaxpayerNumber));
     this.divTax.Visible           = (this.order.Tax > decimal.Zero);
     this.btnPay.Click            += this.btnPay_Click;
     this.lkbtnConfirmOrder.Click += this.lkbtnConfirmOrder_Click;
     this.lkbtnCloseOrder.Click   += this.lkbtnCloseOrder_Click;
     if (!this.Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(this.order.TakeCode))
         {
             this.hidHiPOSTakeCode.Value = Globals.HIPOSTAKECODEPREFIX + this.order.TakeCode;
         }
         if (this.order == null || this.order.UserId != HiContext.Current.UserId)
         {
             this.Page.Response.Redirect("/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该订单不存在或者不属于当前用户的订单"));
         }
         else
         {
             this.BindOrderBase(this.order);
             this.BindOrderAddress(this.order);
             this.BindOrderItems(this.order);
             this.BindStoreInfo(this.order);
             if (!string.IsNullOrEmpty(this.order.InvoiceTitle))
             {
                 UserInvoiceDataInfo userInvoiceDataInfo = this.order.InvoiceInfo;
                 if (userInvoiceDataInfo == null)
                 {
                     userInvoiceDataInfo = new UserInvoiceDataInfo
                     {
                         InvoiceType           = this.order.InvoiceType,
                         InvoiceTaxpayerNumber = this.order.InvoiceTaxpayerNumber.ToNullString(),
                         InvoiceTitle          = this.order.InvoiceTitle.ToNullString()
                     };
                 }
                 this.litInvoiceTaxpayerNumber.SetWhenIsNotNull(this.order.InvoiceTaxpayerNumber);
                 this.litInvoiceTitle.SetWhenIsNotNull(this.order.InvoiceTitle);
                 this.litInvoiceType.SetWhenIsNotNull(EnumDescription.GetEnumDescription((Enum)(object)this.order.InvoiceType, 0));
                 this.litRegisterAddress.SetWhenIsNotNull(userInvoiceDataInfo.RegisterAddress.ToNullString());
                 this.litRegisterTel.SetWhenIsNotNull(userInvoiceDataInfo.RegisterTel.ToNullString());
                 this.litOpenBank.SetWhenIsNotNull(userInvoiceDataInfo.OpenBank.ToNullString());
                 this.litBankName.SetWhenIsNotNull(userInvoiceDataInfo.BankAccount.ToNullString());
                 this.litReceiveName.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveName.ToNullString());
                 if (this.order.InvoiceType != InvoiceType.Enterprise)
                 {
                     this.litReceiveMobbile.SetWhenIsNotNull(userInvoiceDataInfo.ReceivePhone.ToNullString());
                     if (this.order.InvoiceType != InvoiceType.VATInvoice)
                     {
                         this.litReceiveEmail.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveEmail.ToNullString());
                     }
                 }
                 this.litReceiveRegionName.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveRegionName.ToNullString());
                 this.litReceiveAddress.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveAddress.ToNullString());
             }
             if (this.order.FightGroupId > 0)
             {
                 FightGroupInfo fightGroup = VShopHelper.GetFightGroup(this.order.FightGroupId);
                 this.lkbtnApplyForRefund.Visible    = (fightGroup.Status != 0 && this.order.OrderStatus == OrderStatus.BuyerAlreadyPaid && this.order.GetPayTotal() > decimal.Zero);
                 this.litFightGroupStatusLabel.Order = this.order;
             }
         }
     }
 }
Пример #2
0
 private void LoadAllControls()
 {
     this.liFullReduction          = (HtmlGenericControl)this.FindControl("liFullReduction");
     this.litFightGroupStatusLabel = (FightGroupStatusLabel)this.FindControl("litFightGroupStatusLabel");
     this.ensureRecieved           = (HtmlAnchor)this.FindControl("ensureRecieved");
     this.btnOrderRefund           = (HtmlAnchor)this.FindControl("btnOrderRefund");
     this.btnOrderClose            = (HtmlAnchor)this.FindControl("btnOrderClose");
     this.lookupQRCode             = (HtmlAnchor)this.FindControl("lookupQRCode");
     this.litOrderId               = (Literal)this.FindControl("litOrderId");
     this.litOrderDate             = (Literal)this.FindControl("litOrderDate");
     this.litOrderStatus           = (Literal)this.FindControl("litOrderStatus");
     this.rptOrderProducts         = (Common_MemberOrderProducts)this.FindControl("rptOrderProducts");
     this.litTotalPrice            = (Literal)this.FindControl("litTotalPrice");
     this.litPayTime               = (Literal)this.FindControl("litPayTime");
     this.divstoreinfo             = (HtmlGenericControl)this.FindControl("divstoreinfo");
     this.orderStatus              = (HtmlInputHidden)this.FindControl("orderStatus");
     this.hidOrderId               = (HtmlInputHidden)this.FindControl("hidOrderId");
     this.dvClose                  = (HtmlControl)this.FindControl("dvClose");
     this.litRemark                = (Literal)this.FindControl("litRemark");
     this.litShipToDate            = (Literal)this.FindControl("litShipToDate");
     this.litTakeCode              = (Literal)this.FindControl("litTakeCode");
     this.litCloseReason           = (Literal)this.FindControl("litCloseReason");
     this.litCounponPrice          = (Literal)this.FindControl("litCounponPrice");
     this.litPointsPrice           = (Literal)this.FindControl("litPointsPrice");
     this.liPointPrice             = (HtmlGenericControl)this.FindControl("liPointPrice");
     this.litBuildPrice            = (Literal)this.FindControl("litBuildPrice");
     this.litDisCountPrice         = (Literal)this.FindControl("litDisCountPrice");
     this.litFreight               = (Literal)this.FindControl("litFreight");
     this.litFreight2              = (Literal)this.FindControl("litFreight2");
     this.litInvoiceTitle          = (Literal)this.FindControl("litInvoiceTitle");
     this.litInvoiceTaxpayerNumber = (Literal)this.FindControl("litInvoiceTaxpayerNumber");
     this.liInvoiceTitle           = (HtmlGenericControl)this.FindControl("liInvoiceTitle");
     this.liInvoiceTaxpayerNumber  = (HtmlGenericControl)this.FindControl("liInvoiceTaxpayerNumber");
     this.liCounponPrice           = (HtmlGenericControl)this.FindControl("liCounponPrice");
     this.liDiscountPrice          = (HtmlGenericControl)this.FindControl("liDiscountPrice");
     this.litFullCapacityReduction = (Literal)this.FindControl("litFullCapacityReduction");
     this.litPaymentMode           = (Literal)this.FindControl("litPaymentMode");
     this.btnOrderCancel           = (HtmlAnchor)this.FindControl("btnOrderCancel");
     this.litTax                = (Literal)this.FindControl("litTax");
     this.rptCartGifts          = (WapTemplatedRepeater)this.FindControl("rptCartGifts");
     this.rptPromotionGifts     = (WapTemplatedRepeater)this.FindControl("rptPromotionGifts");
     this.divRefund             = (HtmlGenericControl)this.FindControl("divRefund");
     this.litRefundMoney        = (Literal)this.FindControl("litRefundMoney");
     this.divRefundPoint        = (HtmlGenericControl)this.FindControl("divRefundPoint");
     this.divGifts              = (HtmlGenericControl)this.FindControl("divGifts");
     this.divProducts           = (HtmlGenericControl)this.FindControl("divProducts");
     this.litRefundPoint        = (Literal)this.FindControl("litRefundPoint");
     this.liTax                 = (HtmlGenericControl)this.FindControl("liTax");
     this.btnToPay              = (HtmlAnchor)this.FindControl("btnToPay");
     this.paymenttypeselect     = (Common_WAPPaymentTypeSelect)this.FindControl("paymenttypeselect");
     this.hidpresaleStaut       = (HtmlInputHidden)this.FindControl("hidpresaleStaut");
     this.litDepositDate        = (Literal)this.FindControl("litDepositDate");
     this.litFinalDate          = (Literal)this.FindControl("litFinalDate");
     this.litDeposit            = (Literal)this.FindControl("litDeposit");
     this.litFinal              = (Literal)this.FindControl("litFinal");
     this.lit_ValidDate         = (Literal)this.FindControl("lit_ValidDate");
     this.rptVerCode            = (Repeater)this.FindControl("rptVerCode");
     this.divOrderBtn           = (HtmlGenericControl)this.FindControl("divOrderBtn");
     this.rptOrderInputItemInfo = (Repeater)this.FindControl("rptOrderInputItemInfo");
     this.divOrderInputItemInfo = (HtmlGenericControl)this.FindControl("divOrderInputItemInfo");
     this.litOrderInputItemInfo = (Literal)this.FindControl("litOrderInputItemInfo");
 }