Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(this.Page.Request.QueryString["purchaseOrderId"]))
     {
         base.GotoResourceNotFound();
     }
     else
     {
         this.purchaseOrderId              = this.Page.Request.QueryString["purchaseOrderId"];
         this.btnClosePurchaseOrder.Click += new EventHandler(this.btnClosePurchaseOrder_Click);
         this.purchaseOrder = SubsiteSalesHelper.GetPurchaseOrder(this.purchaseOrderId);
         this.LoadUserControl(this.purchaseOrder);
         if (!base.IsPostBack)
         {
             if (this.purchaseOrder.PurchaseStatus == OrderStatus.WaitBuyerPay)
             {
                 this.lkbtnClosePurchaseOrder.Visible = true;
                 this.lkbtnPay.Visible     = true;
                 this.lkbtnPay.NavigateUrl = string.Concat(new object[] { Globals.ApplicationPath, "/Shopadmin/purchaseOrder/ChoosePayment.aspx?PurchaseOrderId=", this.purchaseOrder.PurchaseOrderId, "&PayMode=", this.purchaseOrder.PaymentTypeId });
             }
             else
             {
                 this.lkbtnClosePurchaseOrder.Visible = false;
                 this.lkbtnPay.Visible = false;
             }
             this.lblPurchaseStatus.PuchaseStatusCode = this.purchaseOrder.PurchaseStatus;
             this.litPurchaseOrderId.Text             = this.purchaseOrder.PurchaseOrderId;
             if (((int)this.lblPurchaseStatus.PuchaseStatusCode) != 4)
             {
                 this.lbCloseReason.Visible = false;
             }
             else
             {
                 this.lbReason.Text = this.purchaseOrder.CloseReason;
             }
             if (((int)this.lblPurchaseStatus.PuchaseStatusCode) != 10)
             {
                 this.lbPurchaseOrderReturn.Visible = false;
             }
             else
             {
                 decimal num;
                 this.lblPurchaseOrderRefundMoney.Money = SubsiteSalesHelper.GetRefundMoney(this.purchaseOrder, out num);
             }
             if (this.purchaseOrder.PurchaseStatus == OrderStatus.WaitBuyerPay)
             {
                 if (this.purchaseOrder.PurchaseOrderGifts.Count > 0)
                 {
                     this.hlkOrderGifts.Text = "编辑礼品";
                 }
                 this.hlkOrderGifts.NavigateUrl = Globals.ApplicationPath + "/Shopadmin/purchaseOrder/PurchaseOrderGifts.aspx?PurchaseOrderId=" + this.purchaseOrder.PurchaseOrderId;
             }
             else
             {
                 this.hlkOrderGifts.Visible = false;
             }
         }
     }
 }