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