销售价格维护...如何将网格级用户定义的过滤器应用于 select

Sales Price Maintenance...how to apply grid level user defined filters to select

我有一些更新值的销售价格 (AR202000) 代码。现在,它只根据 header 搜索更改网格中的记录。例如,如果我在网格上快速搜索以限制为“以‘24’开头”,我仍然会得到所有记录。我希望代码中的 select 也限制为用户定义的网格过滤器(我可能不称呼这些是正确的,如下图)。

要循环的代码如下所示:


    foreach (ARSalesPrice price in Base.Records.Select()) // I assume this needs to apply the grid filter
        {
             //Do Stuff
        }

我很确定过滤器可以做到这一点,我只是无法计算出细节。

提前致谢。

评论中使用link的答案...

        foreach (ARSalesPrice price in Base.Records.View.Select(null, null, PXView.Searches, Base.Records.View.GetExternalSorts(), Base.Records.View.GetExternalDescendings(), Base.Records.View.GetExternalFilters() ?? new PXFilterRow[0], ref min, 0, ref totalRows)) //Base.Records.Select())
        {
              // Do Some stuff
        }