关于计算无界字段的一些问题,我希望从网格按行索引(如RowIndex property in c# )中求值,它可以从acumatica获得吗?
protected virtual void BSMTActivityTypePlanDetail_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
if(e.Row == null)
{
return;
}
BSMTActivityTypePlan head = new BSMTActivityTypePlan();
BSMTActivityTypePlanDetail detail = (BSMTActivityTypePlanDetail)e.Row;
for (int x = 0; x <= DetailActTypePlans.Select().RowCount; x++)
{
head.TotalPlanAct += DetailActTypePlans.
}
}解决这个问题的正确方法是什么?谢谢
发布于 2016-04-28 02:26:29
最后,我使用了PXDBScalar,它是关于未绑定字段的工作。
发布于 2016-04-26 16:28:57
我认为有两种可能的解决办法:
第一个更接近你希望达到的目标:使用“foreach”而不是“for”:
foreach (DetailType detail in DetailView.Select())
{
head.TotalPlanAct += detail.PlanActValue;
}另一种方法是使用带有聚合的view,这样它将直接返回总价值,并且不必在代码中循环计算它。
https://stackoverflow.com/questions/36857275
复制相似问题