如何从PXselector获取值 [英] How to get values from PXselector
本文介绍了如何从PXselector获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,我是Acumatica开发的新手,只是想问问我在选择一行时如何从pxselector中获取数据
Hello I am new in Acumatica development just want to ask how to get the data from pxselector when I select a row
这是我创建的选择器
当我选择一个时,我只会得到
when I select one I only get the value for the atc.
但我还需要获取Taxrate的值并将其值放在此处的下一个网格上,WselectPercent放在选定的位置
BUT I ALSO NEED TO GET THE VALUE OF THE Taxrate and put the value on the next grid here WtaxPercent on select
这是我的pxselector代码
here is my code for the pxselector
#region UsrATC
[PXDBString(10)]
[PXUIField(DisplayName="ATC")]
[PXSelector(typeof(Search<withhildingtax.atc>),
typeof(withhildingtax.Atcdescription),
typeof(withhildingtax.Taxrate))]
public virtual string UsrATC { get; set; }
public abstract class usrATC : PX.Data.BQL.BqlString.Field<usrATC> { }
#endregion
#region UsrWTAXPercentage
[PXDBDecimal]
[PXUIField(DisplayName="WTaxPercentage")]
public virtual Decimal? UsrWTAXPercentage { get; set; }
public abstract class usrWTAXPercentage : PX.Data.BQL.BqlDecimal.Field<usrWTAXPercentage> { }
#endregion
在此先感谢您的帮助
推荐答案
public class Test : IBqlTable
{
#region UsrATC
[PXDBString(10)]
[PXUIField(DisplayName = "ATC")]
[PXSelector(typeof(Search<withhildingtax.atc>),
typeof(withhildingtax.Atcdescription),
typeof(withhildingtax.Taxrate))]
public virtual string UsrATC { get; set; }
public abstract class usrATC : PX.Data.BQL.BqlString.Field<usrATC> { }
#endregion
#region UsrWTAXPercentage
[PXDBDecimal]
[PXUIField(DisplayName = "WTaxPercentage")]
[PXDefault(typeof(Search<withhildingtax.Taxrate, Where<withhildingtax.atc, Equal<Current<Test.usrATC>>>>))]
[PXSelector(typeof(Search<withhildingtax.Taxrate, Where<withhildingtax.atc, Equal<Current<Test.usrATC>>>>))]
public virtual Decimal? UsrWTAXPercentage { get; set; }
public abstract class usrWTAXPercentage : PX.Data.BQL.BqlDecimal.Field<usrWTAXPercentage> { }
#endregion
}
public class TestGraph : PXGraph<TestGraph>
{
protected virtual void Test_UsrATC_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
{
if (e.Row is Test row)
{
sender.SetDefaultExt<Test.usrWTAXPercentage>(e.Row);
}
}
}
这篇关于如何从PXselector获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文