单据体赋值没反应
金蝶云社区-云社区用户9R301234
云社区用户9R301234
0人赞赏了该文章 1,332次浏览 未经作者许可,禁止转载编辑于2015年10月10日 14:51:12

背景:需要在根据物料编码更改含税单价的有效小数位最初以为是值更新事件把我的赋值给覆盖了,然后把所有值更新事件和服务实体规则删除了,含税单价的值还是没变,疯掉了,求助大神!!
问题2:单价,KEY: Price,锁定性为0,就是没锁定的,但是我在单据上是改不了的,什么情况?
代码如下:

public override void DataChanged(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.DataChangedEventArgs e)
{
base.DataChanged(e);
switch(e.Field.Key.ToUpperInvariant()){
case "FTAXPRICE":
if (true)
{
object FTaxPrice = (this.View.Model.GetValue("FTaxPrice", e.Row));//Convert.ToDecimal
decimal FTaxPrice2 = Math.Round(Convert.ToDecimal(FTaxPrice), 2, MidpointRounding.AwayFromZero);
if (FTaxPrice != null)
{
this.View.Model.SetValue("FTaxPrice", FTaxPrice2, e.Row);
object test = (this.View.Model.GetValue("FTaxPrice", e.Row));//Convert.ToDecimal
this.View.UpdateView("FTaxPrice", e.Row);
}
object FPrice = this.View.Model.GetValue("FPrice", e.Row);
decimal FPrice2 = Math.Round(Convert.ToDecimal(FPrice), 2, MidpointRounding.AwayFromZero);
if (FPrice != null)
{
this.View.Model.SetValue("FPrice", FPrice2, e.Row);
this.View.UpdateView("FPrice", e.Row);
}
}
break;
default:
break;
}
}

您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!

请选择打赏金币数 *

10金币20金币30金币40金币50金币60金币
可用金币: 0