using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kingdee.BOS;
using Kingdee.BOS.Core.Bill.PlugIn;
//添加引用后,缩写函数
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using System.ComponentModel;
namespace Kingdee.Bos.Project.BillDataChanged.plugln
{
[Description ("DataChanged值更新后触发")]
[Kingdee.BOS.Util.HotUpdate]
public class ClassName:AbstractBillPlugIn
{
// DataChanged事件
//public override void DataChanged(BOS.Core.DynamicForm.PlugIn.Args.DataChangedEventArgs e)
//{
// base.DataChanged(e);
//}
//添加引用后,缩写函数
public override void DataChanged(DataChangedEventArgs e)
{
base.DataChanged(e);
//如果等于客户
if(e.Field.Key =="FCustId")
{
this.View.Model.SetValue("FNote", "客户变化后赋值到备注");
this.View.Model.SetValue("FNote1", "客户变化后赋值到备注1");
//刷新
this.View.UpdateView("FNote");
this.View.UpdateView("FNote1");
//赋值返回的是,基本资料FID内码
//给A字段FCustIdNew,赋新值e.NewValue,更新前的值
this.View.Model.SetValue("FCustIdNew",e.NewValue);
//给B字段FCustIdOld,赋旧值e.OldValue,更新后的值
this.View.Model.SetValue("FCustIdOld", e.OldValue);
//刷新
this.View.UpdateView("FCustIdNew");
this.View.UpdateView("FCustIdOld");
}
//如果等于物料
if (e.Field.Key == "FMaterialId")
{
//给项目名称,赋值
//e.Row 区别是哪一行,+动态变化
this.View.Model.SetValue("F_YDIE_ProjectName", "项目名称" +e.Row.ToString(), e.Row);
}
}
}
}