Exemplo n.º 1
0
 /// <summary>
 /// 获取服务
 /// </summary>
 /// <returns></returns>
 public IAfterSaleService GetInstance()
 {
     if (Instance == null)
     {
         Instance = new AfterSaleService();
     }
     return(Instance);
 }
Exemplo n.º 2
0
        public static IAfterSaleService GetSaleService(AfterSaleServiceTypeEnum type)
        {
            IAfterSaleService afterSaleService = null;

            switch (type)
            {
            case AfterSaleServiceTypeEnum.Exchange:
                afterSaleService = new ExchangeService();
                break;

            case AfterSaleServiceTypeEnum.RefundWhithReturn:
                afterSaleService = new RefundWhithReturnService();
                break;

            case AfterSaleServiceTypeEnum.RefundWhitoutReturn:
                afterSaleService = new RefundWhitoutReturnService();
                break;
            }

            return(afterSaleService);
        }