1
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
using Kingdee.BOS.App;
|
||||
using Kingdee.BOS.Contracts;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Core.Metadata;
|
||||
using Kingdee.BOS.Orm.DataEntity;
|
||||
using Kingdee.BOS.ServiceHelper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace HUIWEI.Lexmark.sftp.SDK.ASN
|
||||
{
|
||||
public class BillEventPlugInEx : AbstractOperationServicePlugIn
|
||||
{
|
||||
|
||||
|
||||
private void TestLoad()
|
||||
{
|
||||
//例如:保存id为10001的物料
|
||||
|
||||
//获取元数据服务
|
||||
|
||||
//MetaDataServiceHelper
|
||||
IMetaDataService metadataService = ServiceHelper.GetService<IMetaDataService>();
|
||||
|
||||
//获取保存服务
|
||||
|
||||
ISaveService saveService = ServiceHelper.GetService<ISaveService>();
|
||||
|
||||
//获取加载数据服务
|
||||
|
||||
IViewService viewService = ServiceHelper.GetService<IViewService>();
|
||||
|
||||
|
||||
//获取物料元数据
|
||||
|
||||
FormMetadata materialMetadata = metadataService.Load(this.Context, "ora_SftpOperationRecord") as FormMetadata;
|
||||
var dynaicObjType = materialMetadata.BusinessInfo.GetDynamicObjectType();
|
||||
|
||||
var newObj = new DynamicObject(dynaicObjType);
|
||||
//获取id为10001的物料数据
|
||||
|
||||
DynamicObject[] objs = viewService.Load(this.Context, new object[] { 10001 }, dynaicObjType);
|
||||
|
||||
//保存id为10001的物料
|
||||
saveService.Save(this.Context, materialMetadata.BusinessInfo, objs);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user