protected void Page_Load(object sender, System.EventArgs e) { if (string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { base.GotoResourceNotFound(); return; } this.orderId = this.Page.Request.QueryString["OrderId"]; this.btnSendGoods.Click += new System.EventHandler(this.btnSendGoods_Click); this.radioShippingMode.SelectedIndexChanged += new System.EventHandler(this.radioShippingMode_SelectedIndexChanged); OrderInfo orderInfo = SubsiteSalesHelper.GetOrderInfo(this.orderId); this.BindOrderItems(orderInfo); if (!this.Page.IsPostBack) { if (orderInfo == null) { base.GotoResourceNotFound(); return; } this.radioShippingMode.DataBind(); this.BindShippingAddress(orderInfo); PurchaseOrderInfo purchaseByOrderId = SubsiteSalesHelper.GetPurchaseByOrderId(this.orderId); if (purchaseByOrderId != null && purchaseByOrderId.PurchaseStatus != OrderStatus.WaitBuyerPay && purchaseByOrderId.PurchaseStatus != OrderStatus.BuyerAlreadyPaid) { this.txtShipOrderNumber.Text = purchaseByOrderId.ShipOrderNumber; this.radioShippingMode.SelectedValue = new int?(purchaseByOrderId.RealShippingModeId); this.BindExpressCompany(purchaseByOrderId.RealShippingModeId); this.expressRadioButtonList.SelectedValue = purchaseByOrderId.ExpressCompanyName; } else { this.radioShippingMode.SelectedValue = new int?(orderInfo.ShippingModeId); this.BindExpressCompany(orderInfo.ShippingModeId); this.expressRadioButtonList.SelectedValue = orderInfo.ExpressCompanyName; } this.litShippingModeName.Text = orderInfo.ModeName; this.litShipToDate.Text = orderInfo.ShipToDate; this.litRemark.Text = orderInfo.Remark; if (this.txtShipOrderNumber.Text.IndexOf("showWindow_ShipInfoPage") != -1) { this.htmlContent1.Attributes.Add("style", "display:none"); this.litlShipOrderNumber.Text = this.txtShipOrderNumber.Text; return; } //this.htmlContent2.Attributes.Add("style", "display:none"); } }
protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { base.GotoResourceNotFound(); } else { this.orderId = this.Page.Request.QueryString["OrderId"]; this.btnSendGoods.Click += new EventHandler(this.btnSendGoods_Click); this.radioShippingMode.SelectedIndexChanged += new EventHandler(this.radioShippingMode_SelectedIndexChanged); OrderInfo orderInfo = SubsiteSalesHelper.GetOrderInfo(this.orderId); this.BindOrderItems(orderInfo); if (!this.Page.IsPostBack) { if (orderInfo == null) { base.GotoResourceNotFound(); } else { this.radioShippingMode.DataBind(); this.BindShippingAddress(orderInfo); PurchaseOrderInfo purchaseByOrderId = SubsiteSalesHelper.GetPurchaseByOrderId(this.orderId); if (((purchaseByOrderId != null) && (purchaseByOrderId.PurchaseStatus != OrderStatus.WaitBuyerPay)) && (purchaseByOrderId.PurchaseStatus != OrderStatus.BuyerAlreadyPaid)) { this.txtShipOrderNumber.Text = purchaseByOrderId.ShipOrderNumber; this.radioShippingMode.SelectedValue = new int?(purchaseByOrderId.RealShippingModeId); this.BindExpressCompany(purchaseByOrderId.RealShippingModeId); this.expressRadioButtonList.SelectedValue = purchaseByOrderId.ExpressCompanyName; } else { this.radioShippingMode.SelectedValue = new int?(orderInfo.ShippingModeId); this.BindExpressCompany(orderInfo.ShippingModeId); this.expressRadioButtonList.SelectedValue = orderInfo.ExpressCompanyName; } this.litShippingModeName.Text = orderInfo.ModeName; this.litShipToDate.Text = orderInfo.ShipToDate; this.litRemark.Text = orderInfo.Remark; } } } }