|
|
|
@ -22,14 +22,15 @@ namespace BWP.B3QingDaoWanFu.Rpc |
|
|
|
[Rpc] |
|
|
|
public static long Insert(Gathering dmo) |
|
|
|
{ |
|
|
|
var outerCode = dmo.AccountCustomer_OuterCode.Trim(); |
|
|
|
using (var context = new TransactionContext()) |
|
|
|
{ |
|
|
|
var bl = BIFactory.Create<IGatheringBL>(context); |
|
|
|
// bl.InitNewDmo(dmo);
|
|
|
|
dmo.Domain_ID = DomainContext.Current.ID; |
|
|
|
var customerId = BIFactory.Create<ICustomerDeviceSetBL>().GetAccountCustomer_ID(dmo.AccountCustomer_OuterCode); |
|
|
|
var customerId = BIFactory.Create<ICustomerDeviceSetBL>().GetAccountCustomer_ID(outerCode); |
|
|
|
if (customerId == 0) |
|
|
|
throw new ApplicationException(string.Format("没有设备号{0}的对应结账客户", dmo.AccountCustomer_OuterCode)); |
|
|
|
throw new ApplicationException(string.Format("没有设备号{0}的对应结账客户", outerCode)); |
|
|
|
dmo.AccountCustomer_ID = customerId; |
|
|
|
|
|
|
|
SetAccountCustomerInfo(dmo, context.Session); |
|
|
|
|