1、给单据头,备注赋值,你好
this.View.Model.SetValue("FNote", "你好");
代码示例:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//引用
using Kingdee.BOS.Core.Bill.PlugIn;
using Kingdee.BOS;
//热启动,不用重启IIS,引用
using System.ComponentModel;
namespace Kingdee.Bos.ObjectName.Bill.Plugln
{
//插件名字
[Description("表单插件获取和设置值")]
//热启动,不用重启IIS
[Kingdee.BOS.Util.HotUpdate]
//继承函数:AbstractBillPlugIn
public class ClassName:AbstractBillPlugIn
{
//重写点击按钮函数
public override void BarItemClick(BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
{
base.BarItemClick(e);
//给单据头,备注赋值,你好
this.View.Model.SetValue("FNote", "你好");
}
}
}
2、//给单据头客户FcustId,赋值内码300638
this.View.Model.SetValue("FcustId", 300638);
3、//给单据体物料FMaterialId编码,第0行,赋值
this.View.Model.SetItemValueByNumber("FMaterialId", "003", 0);
4、第二种方法,//给单据体物料内码ID,第1行,赋值
this.View.Model.SetItemValueByID("FMaterialId", "310992", 1);
5、//获取备注FNote的值,并强制转换成字符串.ToString()
string FNote = this.View.Model.GetValue("FNote").ToString();