如何将这 3 个查询组合在一起并将它们作为数据表返回:
1:
var TDD = 0;
var queryTDD = (from x in db.GetAll<WMINO>()
join y in db.GetAll<WMCTM>()
on x.PO_ID equals y.Contract_ID
select new
{
TDD = x.Payable,
});
2:
Decimal TotalToDatePayable = 0;
TotalToDatePayable = ((from ori in db.GetAll<WMPORI>()
join ctm in db.GetAll<WMCTM>()
on ori.CTMSysID equals ctm.CTMSysID
select ori.ExB4Taxes).Sum());
3:
var query = from ctm in db.GetAll<WMCTM>()
join vnm in db.GetAll<WMVNM>()
on ctm.VendSysID equals vnm.VendSysID
where ctm.WONOs == workOrder && ctm.TransType == "Purchase Order"
select new
{
ctm.CTMSysID,
ctm.Contract_ID,
ctm.VNM_ID};`
任何帮助表示赞赏