public bool CheckAction(PurchaseOrderActions action) { if ((this.PurchaseStatus != OrderStatus.Finished) && (this.PurchaseStatus != OrderStatus.Closed)) { switch (action) { case PurchaseOrderActions.DISTRIBUTOR_CLOSE: case PurchaseOrderActions.DISTRIBUTOR_MODIFY_GIFTS: case PurchaseOrderActions.DISTRIBUTOR_CONFIRM_PAY: case PurchaseOrderActions.MASTER__CLOSE: case PurchaseOrderActions.MASTER__MODIFY_AMOUNT: case PurchaseOrderActions.MASTER_CONFIRM_PAY: return(this.PurchaseStatus == OrderStatus.WaitBuyerPay); case PurchaseOrderActions.DISTRIBUTOR_CONFIRM_GOODS: case PurchaseOrderActions.MASTER_FINISH_TRADE: return(this.PurchaseStatus == OrderStatus.SellerAlreadySent); case PurchaseOrderActions.MASTER__MODIFY_SHIPPING_MODE: return((this.PurchaseStatus == OrderStatus.WaitBuyerPay) || (this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid)); case PurchaseOrderActions.MASTER_MODIFY_DELIVER_ADDRESS: return((this.PurchaseStatus == OrderStatus.WaitBuyerPay) || (this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid)); case PurchaseOrderActions.MASTER_SEND_GOODS: return((this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid) || ((this.PurchaseStatus == OrderStatus.WaitBuyerPay) && (this.Gateway == "hishop.plugins.payment.podrequest"))); case PurchaseOrderActions.MASTER_REJECT_REFUND: return((this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid) || (this.PurchaseStatus == OrderStatus.SellerAlreadySent)); } } return(false); }
public bool CheckAction(PurchaseOrderActions action) { bool result; if (this.PurchaseStatus == OrderStatus.Finished || this.PurchaseStatus == OrderStatus.Closed) { result = false; } else { switch (action) { case PurchaseOrderActions.DISTRIBUTOR_CLOSE: case PurchaseOrderActions.DISTRIBUTOR_MODIFY_GIFTS: case PurchaseOrderActions.DISTRIBUTOR_CONFIRM_PAY: case PurchaseOrderActions.MASTER__CLOSE: case PurchaseOrderActions.MASTER__MODIFY_AMOUNT: case PurchaseOrderActions.MASTER_CONFIRM_PAY: result = (this.PurchaseStatus == OrderStatus.WaitBuyerPay); break; case PurchaseOrderActions.DISTRIBUTOR_CONFIRM_GOODS: case PurchaseOrderActions.MASTER_FINISH_TRADE: result = (this.PurchaseStatus == OrderStatus.SellerAlreadySent); break; case PurchaseOrderActions.MASTER__MODIFY_SHIPPING_MODE: result = (this.PurchaseStatus == OrderStatus.WaitBuyerPay || this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid); break; case PurchaseOrderActions.MASTER_MODIFY_DELIVER_ADDRESS: result = (this.PurchaseStatus == OrderStatus.WaitBuyerPay || this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid); break; case PurchaseOrderActions.MASTER_SEND_GOODS: result = (this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid || (this.PurchaseStatus == OrderStatus.WaitBuyerPay && this.Gateway == "hishop.plugins.payment.podrequest")); break; case PurchaseOrderActions.MASTER_REJECT_REFUND: result = (this.PurchaseStatus == OrderStatus.BuyerAlreadyPaid || this.PurchaseStatus == OrderStatus.SellerAlreadySent); break; default: result = false; break; } } return(result); }
public bool CheckAction(PurchaseOrderActions action) { if ((PurchaseStatus != OrderStatus.Finished) && (PurchaseStatus != OrderStatus.Closed)) { switch (action) { case PurchaseOrderActions.DISTRIBUTOR_CLOSE: case PurchaseOrderActions.DISTRIBUTOR_MODIFY_GIFTS: case PurchaseOrderActions.DISTRIBUTOR_CONFIRM_PAY: case PurchaseOrderActions.MASTER__CLOSE: case PurchaseOrderActions.MASTER__MODIFY_AMOUNT: case PurchaseOrderActions.MASTER_CONFIRM_PAY: return (PurchaseStatus == OrderStatus.WaitBuyerPay); case PurchaseOrderActions.DISTRIBUTOR_CONFIRM_GOODS: case PurchaseOrderActions.MASTER_FINISH_TRADE: return (PurchaseStatus == OrderStatus.SellerAlreadySent); case PurchaseOrderActions.MASTER__MODIFY_SHIPPING_MODE: return ((PurchaseStatus == OrderStatus.WaitBuyerPay) || (PurchaseStatus == OrderStatus.BuyerAlreadyPaid)); case PurchaseOrderActions.MASTER_MODIFY_DELIVER_ADDRESS: return ((PurchaseStatus == OrderStatus.WaitBuyerPay) || (PurchaseStatus == OrderStatus.BuyerAlreadyPaid)); case PurchaseOrderActions.MASTER_SEND_GOODS: return (PurchaseStatus == OrderStatus.BuyerAlreadyPaid); case PurchaseOrderActions.MASTER_REJECT_REFUND: return ((PurchaseStatus == OrderStatus.BuyerAlreadyPaid) || (PurchaseStatus == OrderStatus.SellerAlreadySent)); } } return false; }