Пример #1
0
        public void ManualAbandon(int soIncomeSysNo)
        {
            TransactionOptions options = new TransactionOptions();

            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout        = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {
                SOIncomeInfo dbInfo = Load(soIncomeSysNo);
                if (dbInfo.Status != (int)AppEnum.SOIncomeStatus.Origin)
                {
                    throw new BizException("soincome: the status is not origin, abandon failed.");
                }

                if (dbInfo.IncomeStyle != (int)AppEnum.SOIncomeStyle.Advanced)
                {
                    throw new BizException("Only advanced income can be manually abandon");
                }

                Hashtable ht = new Hashtable(5);
                ht.Add("SysNo", dbInfo.SysNo);
                ht.Add("Status", (int)AppEnum.SOIncomeStatus.Abandon);
                new SOIncomeDac().Update(ht);

                NetPayManager.GetInstance().SOIncomeAbandon(dbInfo.OrderSysNo);

                //如果Manual Abandon
                SaleManager.GetInstance().UnPaySO(dbInfo.OrderSysNo);

                DeleteSOIncomeVoucher(soIncomeSysNo);

                scope.Complete();
            }
        }
Пример #2
0
 public static NetPayManager GetInstance()
 {
     if (_instance == null)
     {
         _instance = new NetPayManager();
     }
     return(_instance);
 }
Пример #3
0
 public static NetPayManager GetInstance()
 {
     if( _instance == null )
     {
         _instance = new NetPayManager();
     }
     return _instance;
 }