Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我如何准备物理计数_C#_Acumatica - Fatal编程技术网

C# 我如何准备物理计数

C# 我如何准备物理计数,c#,acumatica,C#,Acumatica,你好,我尝试过过滤prepare physical count grid视图,但我不确定我是否在这个视图上执行了正确的过程。我补充说 #region UsrRemoveZero [PXBool] [PXUIField(DisplayName = "Remove Locations with Zero Qty")] public bool? UsrRemoveZero { get; set; } public abstract class usrRemoveZero : PX

你好,我尝试过过滤prepare physical count grid视图,但我不确定我是否在这个视图上执行了正确的过程。我补充说

#region UsrRemoveZero
[PXBool]
[PXUIField(DisplayName = "Remove Locations with Zero Qty")]

public bool? UsrRemoveZero { get; set; }
public abstract class usrRemoveZero : PX.Data.BQL.BqlBool.Field<usrRemoveZero> { }
#endregion
#区域USRREMOVERZERO
[PXBool]
[PXUIField(DisplayName=“删除数量为零的位置”)]
公共场所?UsrRemoveZero{get;set;}
公共抽象类usrRemoveZero:PX.Data.BQL.BqlBool.Field{}
#端区
我想过滤掉价值不大于0的图书数量,但我没有成功,这就是我目前的情况

protected virtual IEnumerable PreliminaryResultRecs()
{
    //PIGeneratorSettings filterrows = Base.GeneratorSettings.Current;
    //var filterrowsExt = PXCache<PIGeneratorSettings>.GetExtension<PIGeneratorSettingsExt>(filterrows);
    //foreach (PIPreliminaryResult row in Base.PreliminaryResultRecs.Select())
    //{
    //    if (filterrowsExt.UsrRemoveZero == true)
    //    {
    //        if (row.BookQty > 0)
    //            yield return row;
    //    }
    //}
    foreach (PIPreliminaryResult res in PXSelect<PIPreliminaryResult>.Select())
    {
        // Additional restriction goes here

            yield return res;
        
    }
}
受保护的虚拟IEnumerable PreiminaryResultRecs()
{
//PIGeneratorSettings filterrows=Base.GeneratorSettings.Current;
//var filterrowsExt=PXCache.GetExtension(filterrows);
//foreach(Base.PreliminaryResultRecs.Select()中的PIPreliminaryResult行)
//{
//如果(FilterRowText.UsrRemoveZero==true)
//    {
//如果(row.BookQty>0)
//收益返回行;
//    }
//}
foreach(PXSelect.Select()中的PIPreliminaryResult res)
{
//这里有额外的限制
收益率;
}
}
但在我这边什么都不起作用,只是在屏幕上出错了。

您需要首先在扩展中公开PXFilterable视图。 我在下面做了一个快速指南来解释这个模式。我知道还有其他方法可以做到这一点,但这对我来说很有效: