|
|
@ -178,7 +178,7 @@ namespace BWP.B3ClientService.Tasks |
|
|
void SyncLivestock() |
|
|
void SyncLivestock() |
|
|
{ |
|
|
{ |
|
|
var result = RpcFacade.Call<string>("/MainSystem/B3ButcherManage/Rpcs/TouchScreenRpcs/GetLivestock"); |
|
|
var result = RpcFacade.Call<string>("/MainSystem/B3ButcherManage/Rpcs/TouchScreenRpcs/GetLivestock"); |
|
|
var list = serializer.Deserialize<List<CTuple<long, string, short, int?>>>(result); |
|
|
|
|
|
|
|
|
var list = serializer.Deserialize<List<CTuple<long, string, short, int?,string>>>(result); |
|
|
using (var context = new TransactionContext()) |
|
|
using (var context = new TransactionContext()) |
|
|
{ |
|
|
{ |
|
|
var sql1 = @"truncate table [B3ClientService_Livestock];"; |
|
|
var sql1 = @"truncate table [B3ClientService_Livestock];"; |
|
|
@ -190,6 +190,7 @@ namespace BWP.B3ClientService.Tasks |
|
|
entity.Name = item.Item2; |
|
|
entity.Name = item.Item2; |
|
|
entity.Technics = item.Item3; |
|
|
entity.Technics = item.Item3; |
|
|
entity.SortNum = item.Item4; |
|
|
entity.SortNum = item.Item4; |
|
|
|
|
|
entity.Shortcut = item.Item5; |
|
|
context.Session.Insert(entity); |
|
|
context.Session.Insert(entity); |
|
|
} |
|
|
} |
|
|
context.Commit(); |
|
|
context.Commit(); |
|
|
|