在准备打印数据包的时候,断点只走过表头,表体的走不进
public override void OnPrepareNotePrintData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.PreparePrintDataEventArgs e)
{
List
DynamicObjectCollection docEntryData=null;
try
{
base.OnPrepareNotePrintData(e);
if (e.DataSourceId.ToUpper().Equals("FBillHead".ToUpper()))
{
var doNewHead = new DynamicObject(e.DynamicObjectType);
doNewHead["FCARNO"] = this.Model.GetValue("FCARNO"); //车牌号
doNewHead["FRECEIVER"] = this.Model.GetValue("FRECEIVER"); //收货人
e.DataObjects = new DynamicObject[] { doNewHead };
}
if (e.DataSourceId.ToUpper().Equals("FEntity".ToUpper()))
{
lstEntryData = new List
docEntryData=this.Model.DataObject["BC_LOADPRINTENTRY"] as DynamicObjectCollection;
foreach (DynamicObject doValue in docEntryData)
{
var doNewEntryRow = new DynamicObject(e.DynamicObjectType);
doNewEntryRow["FMATERIALID_FNumber"] = doValue["FMATERIALID"]; //物料编码
doNewEntryRow["FMATERIALID_FName"] = doValue["FMATERIALNAME"]; //物料名称
doNewEntryRow["FUNITID_FName"] = doValue["FUNITID"]; //单位
doNewEntryRow["FQTY"] = doValue["FQTY"]; //数量
lstEntryData.Add(doNewEntryRow);
}
e.DataObjects = lstEntryData.ToArray();
}
}
推荐阅读