This commit is contained in:
2020-12-24 20:27:46 +00:00
parent efee200669
commit 4e2840ad1c

View File

@@ -11,30 +11,34 @@ namespace AyaNova.Biz
public static class AyaFormFieldDefinitions
{
private static Dictionary<string, List<AyaFormFieldDefinition>> _ayaFormFields;
private static List<string> _ayaFormFieldDefinitionKeys = null;
public static List<string> AyaFormFieldDefinitionKeys
{
get
{
//return the names of all AyaTypes that have the corebizobject attribute
List<string> l = new List<string>();
if (_ayaFormFieldDefinitionKeys == null)
{
_ayaFormFieldDefinitionKeys = new List<string>();
var values = Enum.GetValues(typeof(AyaType));
foreach (AyaType t in values)
{
if (t.HasAttribute(typeof(CoreBizObjectAttribute)))
{
l.Add(t.ToString());
_ayaFormFieldDefinitionKeys.Add(t.ToString());
}
}
//No type form keys:
l.Add("Contact");
return l;
_ayaFormFieldDefinitionKeys.Add("Contact");
}
return _ayaFormFieldDefinitionKeys;
}
}
public static bool IsValidFormFieldDefinitionKey(string key)
{
System.Diagnostics.Debugger.Log(1, "DEV_TEST", $"AyaFormFieldDefinitions::IsValidFormFieldDefinitionKey {key}\n");
return AyaFormFieldDefinitionKeys.Contains(key);
}