代码:
foreach (ARTran tran in PXSelect<ARTran, InnerJoin<ContractItem,
On<ContractItem.contractItemID, Equal<ARTran.inventoryID>>,
Where<ARTran.tranType, Equal<Required<ARInvoice.docType>>,
And<ARTran.refNbr, Equal<Required<ARInvoice.refNbr>>>>,
OrderBy<Asc<ARTran.tranType, Asc<ARTran.refNbr,
Asc<ARTran.lineNbr>>>>>>
.Select(Base, invoice.DocType, invoice.RefNbr))
当我尝试发布时,我得到以下内容:
\ App_RuntimeCode \ ARReleaseProcess.cs(67):错误CS0305:使用泛型类型&#39; PX.Data.InnerJoin&#39;需要2个类型参数 \ App_RuntimeCode \ ARReleaseProcess.cs(67):错误CS0305:使用泛型类型&#39; PX.Data.InnerJoin&#39;需要2个类型参数
答案 0 :(得分:0)
下面的BQL查询应该编译没有任何错误:
foreach (ARTran tran in PXSelectJoin<ARTran,
InnerJoin<ContractItem,
On<ContractItem.contractItemID, Equal<ARTran.inventoryID>>>,
Where<ARTran.tranType, Equal<Required<ARInvoice.docType>>, And<ARTran.refNbr, Equal<Required<ARInvoice.refNbr>>>>, OrderBy<Asc<ARTran.tranType, Asc<ARTran.refNbr, Asc<ARTran.lineNbr>>>>>
.Select(Base, invoice.DocType, invoice.RefNbr))
{
...
}