This commit is contained in:
2020-01-15 15:49:03 +00:00
parent fb87ddc312
commit 14c38d5c6a
3 changed files with 26 additions and 12 deletions

View File

@@ -1,11 +1,12 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace AyaNova.Biz
{
//************************************************
// This contains all the fields that are:
// Customizable on forms
// In grid list templates
// - Customizable on forms
// - In grid list templates
//In addition it serves as a source for valid object keys in AvailableObjectKeys
//
public static class ObjectFields
@@ -110,7 +111,7 @@ namespace AyaNova.Biz
default:
throw new System.ArgumentOutOfRangeException($"ObjectFields: {key} is not a valid form key");
throw new System.ArgumentOutOfRangeException($"ObjectFields: {key} is not a valid object key");
}
return l;
}
@@ -128,6 +129,18 @@ namespace AyaNova.Biz
}
//Accept a json template
//return a column list suitable for api list return
public static string GenerateListColumnJSONFromTemplate(string ObjectKey, string template)
{
//parse the template
var jtemplate = JObject.Parse(template);
var fields= ObjectFieldsList(ObjectKey);
return "";
}
}//eoc ObjectFields
@@ -146,7 +159,7 @@ namespace AyaNova.Biz
public string EnumType { get; set; }
//if field is a reference to another object (i.e. a client in a workorders list)
//then the type to open is set here
public int AyObjectType {get;set;}
public int AyObjectType { get; set; }
public ObjectField()
@@ -159,7 +172,7 @@ namespace AyaNova.Biz
Sortable = true;
MiniAvailable = true;
//Set openable object type to no type which is the default and means it's not a link to another object
AyObjectType=(int)AyaType.NoType;
AyObjectType = (int)AyaType.NoType;
}
}