套打插件,预览数据都没出来
金蝶云社区-云社区用户9R301234
云社区用户9R301234
0人赞赏了该文章 1,415次浏览 未经作者许可,禁止转载编辑于2015年11月20日 16:00:32

背景:动态表单,套打插件,预览了数据没出来,调试时数据包里面是有数据的
代码:
public override void OnPrepareNotePrintQueryParam(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.PrepareNotePrintQueryParamEventArgs e)
{
e.QueryParameter = null;
base.OnPrepareNotePrintQueryParam(e);
}

public override void OnPrepareNotePrintData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.PreparePrintDataEventArgs e)
{
//构建新数据包并提供给系统
if (e.DataSourceId.Equals("FBillHead", StringComparison.OrdinalIgnoreCase))
{
var metaData = FormMetaDataCache.GetCachedFormMetaData(this.Context, this.View.BillBusinessInfo.GetForm().Id);
var barcodeobj = new DynamicObject(metaData.BusinessInfo.GetDynamicObjectType());
barcodeobj["F_LQ_NewOwnerID_Id"] = this.View.Model.GetValue("F_LQ_NewOwnerID_Id");
barcodeobj["F_LQ_NewOwnerID"] = this.View.Model.GetValue("F_LQ_NewOwnerID");
barcodeobj["F_LQ_dyNewid"] = this.View.Model.GetValue("F_LQ_dyNewid");
barcodeobj["F_LQ_dyNewid_id"] = this.View.Model.GetValue("F_LQ_dyNewid_id");
e.DataObjects = new DynamicObject[] { barcodeobj };//新数据包;
e.DynamicObjectType = barcodeobj.DynamicObjectType;//新数据包的DynamicObjectType;

}
base.OnPrepareNotePrintData(e);
}