This commit is contained in:
@@ -21,19 +21,27 @@ namespace AyaNova.PickList
|
||||
}
|
||||
|
||||
//List all the PickList-able object types available
|
||||
internal static List<NameIdItem> GetListOfAllPickListKeyNames()
|
||||
{
|
||||
|
||||
internal static List<NameIdItem> GetListOfAllPickListTypes(long TranslationId)
|
||||
{
|
||||
List<string> TranslationKeysToFetch = new List<string>();
|
||||
List<NameIdItem> ret = new List<NameIdItem>();
|
||||
var values = System.Enum.GetValues(typeof(AyaType));
|
||||
foreach (AyaType t in values)
|
||||
{
|
||||
if (t.HasAttribute(typeof(CoreBizObjectAttribute)))
|
||||
{
|
||||
ret.Add(new NameIdItem() { Name = t.ToString(), Id = (long)t });
|
||||
var name = t.ToString();
|
||||
TranslationKeysToFetch.Add(name);
|
||||
ret.Add(new NameIdItem() { Name = name, Id = (long)t });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var LT = TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, TranslationId).Result;
|
||||
foreach (NameIdItem i in ret)
|
||||
{
|
||||
i.Name = LT[i.Name];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user