Example #1
0
        //public void SetPayment(Payment payment)
        //{
        //    if (OrderHasBeenPaidFor())
        //    {
        //        throw new Exception("已支付");
        //    }
        //    if (OrderTotalMatches(payment))
        //    {
        //        Payment = payment;
        //    }
        //    else
        //    {
        //        throw new Exception("支付金额错误");
        //    }
        //    _orderState.Submit(this);
        //}

        //public bool OrderHasBeenPaidFor()
        //{
        //    return Payment !=null && OrderTotalMatches(Payment);
        //}

        public bool SystemLocker()
        {
            var lockered = _orderState.SystemLocker(this);

            return(lockered);
        }