Exemplo n.º 1
0
        /// <summary>
        /// 退款后更新退款调整单信息
        /// </summary>
        /// <param name="sysNo"></param>
        /// <param name="ROAmt"></param>
        private void UpdateRefundBalanceForRefund(int sysNo, decimal ROAmt, out int NewOrderSysNo)
        {
            RefundBalanceInfo newEntity = new RefundBalanceInfo();

            if (ROAmt > 0)
            {
                newEntity.NewOrderSysNo = ObjectFactory <IRefundDA> .Instance.CreateSysNo();

                newEntity.BalanceOrderType = RefundBalanceType.RO;
            }
            else//生成虚拟SO
            {
                newEntity.NewOrderSysNo    = ExternalDomainBroker.NewSOSysNo();
                newEntity.BalanceOrderType = RefundBalanceType.SO;
            }

            NewOrderSysNo = newEntity.NewOrderSysNo.Value;

            newEntity.SysNo           = sysNo;
            newEntity.Status          = RefundBalanceStatus.Refunded;
            newEntity.RefundTime      = DateTime.Now;
            newEntity.RefundUserSysNo = ServiceContext.Current.UserSysNo;
            this.refundBalanceDA.UpdateRefundBalance(newEntity);
        }