屠宰场管理服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;
using BWP.B3ClientService.BO;
using BWP.B3ClientService.Rpcs.RpcBO.Bill;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.JsonRpc;
using Newtonsoft.Json;
using TSingSoft.WebPluginFramework;
namespace BWP.B3ClientService.Rpcs.BillRpc
{
[Rpc]
public static class ClientGoodsSetRpc
{
static JavaScriptSerializer serializer = new JavaScriptSerializer();
[Rpc]
public static string GetList()
{
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.Name = set.Name;
dto.Goods_ID = setDetail.Goods_ID;
dto.Goods_Name = setDetail.Goods_Name;
dto.Goods_Code = setDetail.Goods_Code;
dto.Goods_Spec = setDetail.Goods_Spec;
list.Add(dto);
}
}
var json = serializer.Serialize(list);
return json;
}
}
}