Browse Source

根据适用客户端 选择存货

master
wugang 8 years ago
parent
commit
491862e81f
2 changed files with 21 additions and 3 deletions
  1. +19
    -3
      B3ClientService/Rpcs/BillRpc/ClientGoodsSetRpc.cs
  2. +2
    -0
      B3ClientService/Rpcs/RpcBO/Bill/ClientGoodsSetDto.cs

+ 19
- 3
B3ClientService/Rpcs/BillRpc/ClientGoodsSetRpc.cs View File

@ -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;
}


+ 2
- 0
B3ClientService/Rpcs/RpcBO/Bill/ClientGoodsSetDto.cs View File

@ -8,6 +8,8 @@ namespace BWP.B3ClientService.Rpcs.RpcBO.Bill
[Serializable]
public class ClientGoodsSetDto
{
public string ApplyClient { get; set; }
public string Name { get; set; }
public long Goods_ID { get; set; }
public string Goods_Name { get; set; }


Loading…
Cancel
Save