Example #1
0
        public static ReturnProcessTemplate CreateFrom(ReturnOrder order)
        {
            switch (order.Action)
            {
            case ReturnAction.FaultyReturn:
                return(new FaultyReturnProcess());

            case ReturnAction.NoQuibblesReturn:
                return(new NoQuibblesReturnProcess());

            default:
                throw new ApplicationException("没有退货流程被定义");
            }
        }
 public override void CalculateReturnFor(ReturnOrder order)
 {
     throw new NotImplementedException();
 }
 public override void GenerateReturnTransactionFor(ReturnOrder order)
 {
     throw new NotImplementedException();
 }
Example #4
0
        public void Process(ReturnOrder order)
        {
            ReturnProcessTemplate returnProcess = ReturnProcessFactory.CreateFrom(order);

            returnProcess.Process(order);
        }
 public void Process(ReturnOrder order)
 {
     GenerateReturnTransactionFor(order);
     CalculateReturnFor(order);
 }
 public abstract void CalculateReturnFor(ReturnOrder order);
 public abstract void GenerateReturnTransactionFor(ReturnOrder order);