基础资料数据包赋值
6人赞赏了该文章
4,427次浏览
编辑于2018年02月02日 10:40:51
foreach (var obj in dynoCollection)
{
DynamicObject dyobj = new DynamicObject(entry.DynamicObjectType);
dyobj["FDate"] = obj["FDate"]; //入库日期
dyobj["FMaterialID_ID"] = obj["FMaterialID"]; //物料代码
if (Convert.ToInt32(obj["FMaterialID"]) != 0)
{
dyobj["FMaterialID"] =
Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.LoadSingle(this.Context,
obj["FMaterialID"],
(this.View.BusinessInfo.GetField("FMaterialID") as BaseDataField)
.RefFormDynamicObjectType);
}
}
{
DynamicObject dyobj = new DynamicObject(entry.DynamicObjectType);
dyobj["FDate"] = obj["FDate"]; //入库日期
dyobj["FMaterialID_ID"] = obj["FMaterialID"]; //物料代码
if (Convert.ToInt32(obj["FMaterialID"]) != 0)
{
dyobj["FMaterialID"] =
Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.LoadSingle(this.Context,
obj["FMaterialID"],
(this.View.BusinessInfo.GetField("FMaterialID") as BaseDataField)
.RefFormDynamicObjectType);
}
}
推荐阅读