protected override void SaveAudit(SOStatus nextStatus) { TransactionOptions options = new TransactionOptions(); options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted; using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options)) { base.SaveAudit(nextStatus); SODA.UpdateSOOutStockTime(SOSysNo); scope.Complete(); } }
/// <summary> /// 电子卡订单完成 /// </summary> protected void ElectronicCardComplete() { // 1. 激活电子卡 ExternalDomainBroker.CreateElectronicGiftCard(SOSysNo, CurrentSO.BaseInfo.CustomerSysNo.Value, CurrentSO.Items[0].OriginalPrice.Value, CurrentSO.Items[0].Quantity.Value, CurrentSO.CompanyCode, ""); // 2. 更新订单的出库时间和订单中商品的出库时间 DateTime outStockTime = DateTime.Now; SODA.UpdateSOOutStockTime(SOSysNo); CurrentSO.ShippingInfo.OutTime = outStockTime; CurrentSO.Items.ForEach(item => { item.IsShippedOut = true; item.ShippedOutTime = outStockTime; }); // 3. 发送成功邮件。 ObjectFactory <SOSendMessageProcessor> .Instance.ActivateElectronicSendMailToCustomer(CurrentSO); }