移动单据的移动列表保存web端保存不了
金蝶云社区-horizon
horizon
0人赞赏了该文章 583次浏览 未经作者许可,禁止转载编辑于2016年10月20日 15:48:08

在移动端的移动列表上录入数据保存到自定义cloud单据的单据体上不生效,麻烦帮忙看看!IMetaDataService metaSrvice = Kingdee.BOS.Contracts.ServiceFactory.GetMetaDataService(this.Context);
FormMetadata formMetadata = MetaDataServiceHelper.Load(this.Context, "PAEZ_CK_LeadBill") as FormMetadata;
BusinessInfo info = formMetadata.BusinessInfo;
DynamicObject dynamicObject = new DynamicObject(info.GetDynamicObjectType());
DynamicObjectCollection dyEntitys = new DynamicObjectCollection(info.GetEntryEntity("FEntity").DynamicObjectType);

DynamicObjectCollection mobileEntitys = this.View.Model.DataObject["FMobileListViewEntity"] as DynamicObjectCollection;

for (int i = 0; i < mobileEntitys.Count(); i++)
{
DynamicObject dyEntity = new DynamicObject(info.GetEntryEntity("FEntity").DynamicObjectType);
dyEntity["F_PAEZ_ITEM"] = this.View.Model.GetValue("F_PAEZ_Item", i);
dyEntity["F_PAEZ_UnitID"] = this.View.Model.GetValue("F_PAEZ_UnitID", i);
dyEntity["F_PAEZ_Qty"] = this.View.Model.GetValue("F_PAEZ_Qty", i);

dyEntitys.Add(dyEntity);
}

ISaveService service = ServiceFactory.GetSaveService(this.Context);
IOperationResult result = service.Save(this.Context, info, new DynamicObject[] { dynamicObject });