From cc3df152b3d12c03ae14489bcca3ab8a11db7931 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期六, 27 四月 2024 16:33:12 +0800 Subject: [PATCH] 工艺路线 --- Tiger.Business/WMS/MengQi/Biz.Mq.Customer.cs | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/Tiger.Business/WMS/MengQi/Biz.Mq.Customer.cs b/Tiger.Business/WMS/MengQi/Biz.Mq.Customer.cs index 3327b8a..550738b 100644 --- a/Tiger.Business/WMS/MengQi/Biz.Mq.Customer.cs +++ b/Tiger.Business/WMS/MengQi/Biz.Mq.Customer.cs @@ -62,7 +62,7 @@ public async Task<ApiAction> SaveImportCustomerInfo(List<Customer> list) { var res = new ApiAction(); - //鏇存柊鏈哄瀷璁板綍 + //鏇存柊瀹㈡埛璁板綍 var db = Db; var dbTran = await db.UseTranAsync(async () => { @@ -75,6 +75,39 @@ } return res; } + + /// <summary> + /// 淇濆瓨瀹㈡埛 + /// </summary> + /// <param name="user"></param> + /// <returns></returns> + public async Task<ApiAction> SaveCustomer(Customer customer) + { + var result = new ApiAction(); + try + { + + var db = Db; + var dbTran = db.UseTran(() => + { + var y = db.Storageable(customer) + .WhereColumns(t => new { t.CustomerCode }) + .ToStorage(); + y.AsInsertable.ExecuteCommand(); + y.AsUpdateable.ExecuteCommand(); + }); + if (!dbTran.IsSuccess) + { + result.IsSuccessed = false; + result.Message = $"瀵煎叆寮傚父"; + } + } + catch (Exception ex) + { + result.CatchExceptionWithLog(ex, "淇濆瓨瀹㈡埛寮傚父"); + } + return result; + } } } } -- Gitblit v1.9.3