Workspace桌面版如何读取业务属性的附件?
How to read the annex of a business attribute in Workspace Desktop Edition?
使用开箱即用的 WDE 自定义框架,是否可以从自定义业务属性的附件中读取?
这对我有用:
私人领域:
private readonly IConfigurationService _configurationService;
您的负责人:
public YourThing(IConfigurationService configurationService)
{
_configurationService = configurationService;
}
你的某处 class:
string dispositionBusinessAttributeName = [get your BA name here];
CfgEnumerator cfgEnumerator = _configurationService.RetrieveObject<CfgEnumerator>((ICfgQuery)new CfgEnumeratorQuery()
{
TenantDbid = _configurationService.WorkingTenant,
Name = dispositionBusinessAttributeName
});
CfgEnumeratorValueQuery enumeratorValueQuery = new CfgEnumeratorValueQuery();
enumeratorValueQuery.EnumeratorDbid = cfgEnumerator.DBID;
enumeratorValueQuery.TenantDbid = _configurationService.WorkingTenant;
ICollection<CfgEnumeratorValue> cfgEnumeratorValues = _configurationService.RetrieveMultipleObjects<CfgEnumeratorValue>((ICfgQuery)enumeratorValueQuery);
使用开箱即用的 WDE 自定义框架,是否可以从自定义业务属性的附件中读取?
这对我有用:
私人领域:
private readonly IConfigurationService _configurationService;
您的负责人:
public YourThing(IConfigurationService configurationService)
{
_configurationService = configurationService;
}
你的某处 class:
string dispositionBusinessAttributeName = [get your BA name here];
CfgEnumerator cfgEnumerator = _configurationService.RetrieveObject<CfgEnumerator>((ICfgQuery)new CfgEnumeratorQuery()
{
TenantDbid = _configurationService.WorkingTenant,
Name = dispositionBusinessAttributeName
});
CfgEnumeratorValueQuery enumeratorValueQuery = new CfgEnumeratorValueQuery();
enumeratorValueQuery.EnumeratorDbid = cfgEnumerator.DBID;
enumeratorValueQuery.TenantDbid = _configurationService.WorkingTenant;
ICollection<CfgEnumeratorValue> cfgEnumeratorValues = _configurationService.RetrieveMultipleObjects<CfgEnumeratorValue>((ICfgQuery)enumeratorValueQuery);