|
|
|
@ -18,16 +18,24 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
|
static JavaScriptSerializer serializer = new JavaScriptSerializer(); |
|
|
|
|
|
|
|
[Rpc] |
|
|
|
public static string GetList() |
|
|
|
public static string GetListByApplyClient(string applyClient) |
|
|
|
{ |
|
|
|
var list = GetListDto().Where(x => x.ApplyClient == applyClient).ToList(); |
|
|
|
var json = serializer.Serialize(list); |
|
|
|
return json; |
|
|
|
} |
|
|
|
|
|
|
|
static List<ClientGoodsSetDto> GetListDto() |
|
|
|
{ |
|
|
|
var list=new List<ClientGoodsSetDto>(); |
|
|
|
var query=new DmoQuery(typeof(ClientGoodsSet)); |
|
|
|
var list = new List<ClientGoodsSetDto>(); |
|
|
|
var query = new DmoQuery(typeof(ClientGoodsSet)); |
|
|
|
var clist = query.EExecuteList().Cast<ClientGoodsSet>().ToList(); |
|
|
|
foreach (ClientGoodsSet set in clist) |
|
|
|
{ |
|
|
|
foreach (ClientGoodsSet_Detail setDetail in set.Details) |
|
|
|
{ |
|
|
|
var dto = new ClientGoodsSetDto(); |
|
|
|
dto.ApplyClient = set.ApplyClient; |
|
|
|
dto.Name = set.Name; |
|
|
|
dto.Goods_ID = setDetail.Goods_ID; |
|
|
|
dto.Goods_Name = setDetail.Goods_Name; |
|
|
|
@ -36,6 +44,14 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
|
list.Add(dto); |
|
|
|
} |
|
|
|
} |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Rpc] |
|
|
|
public static string GetList() |
|
|
|
{ |
|
|
|
var list = GetListDto(); |
|
|
|
var json = serializer.Serialize(list); |
|
|
|
return json; |
|
|
|
} |
|
|
|
|