0
使用開箱即用的WDE定製框架,是否可以從附件中讀取定製的業務屬性?如何在Workspace Desktop Edition中讀取業務屬性的附件?
使用開箱即用的WDE定製框架,是否可以從附件中讀取定製的業務屬性?如何在Workspace Desktop Edition中讀取業務屬性的附件?
這爲我工作:
私人領域:
private readonly IConfigurationService _configurationService;
您的構造函數:
public YourThing(IConfigurationService configurationService)
{
_configurationService = configurationService;
}
某處在您的類:
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);