This commit is contained in:
PastSaid
2024-07-16 10:33:50 +08:00
parent e8a1f46c3d
commit fa480006a8
132 changed files with 20893 additions and 4519 deletions

View File

@@ -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);
}
}
}