public async Task <string> GetCurrentLabel(OptionSetValueItem item) { //通过使用StringLanguageTranslate来获取基于当前上下文语言的标签 //多语言键为选项集名称+"."+选项集项的值 var result = StringLanguageTranslate.Translate($"{ item.OptionSetValue.Name}.{item.Value.ToString()}", item.DefaultLabel); return(await Task.FromResult(result)); }
/// <summary> /// 为选项集修改项 /// </summary> /// <param name="item"></param> /// <returns></returns> public async Task UpdateItem(OptionSetValueItem item) { await _imp.UpdateItem(this, item); }
public async Task UpdateItem(OptionSetValueMetadata metadata, OptionSetValueItem item) { item.OptionSetValue = metadata; await _optionSetValueItemStore.Update(item); }
/// <summary> /// 为选项集增加项 /// </summary> /// <param name="item"></param> /// <returns></returns> public async Task AddItem(OptionSetValueItem item) { await _imp.AddItem(this, item); }