|
|
|
|
@@ -42,7 +42,7 @@ namespace AyaNova.Biz
|
|
|
|
|
return AvailableObjectKeys.Contains(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static List<AyaField> ObjectFieldsList(string key)
|
|
|
|
|
public static List<AyaFieldDefinition> ObjectFieldsList(string key)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
***************************** WARNING: Be careful here, if a standard field is hideable and also it's DB SCHEMA is set to NON NULLABLE then the CLIENT end needs to set a default
|
|
|
|
|
@@ -55,7 +55,7 @@ namespace AyaNova.Biz
|
|
|
|
|
Sortable = true;
|
|
|
|
|
MiniAvailable = true;
|
|
|
|
|
*/
|
|
|
|
|
List<AyaField> l = new List<AyaField>();
|
|
|
|
|
List<AyaFieldDefinition> l = new List<AyaFieldDefinition>();
|
|
|
|
|
switch (key)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
@@ -157,73 +157,73 @@ namespace AyaNova.Biz
|
|
|
|
|
|
|
|
|
|
//first column is the non visible Default Id column so that the client knows what to open when there is no field with ID selected that matches underlying record type
|
|
|
|
|
//in this case the default of id is sufficient for this list
|
|
|
|
|
l.Add(new AyaField { LtKey = "df", AyaObjectType = (int)AyaType.Widget });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetName", FieldKey = "Name", UiFieldDataType = (int)AyaUiFieldDataType.Text, Hideable = false });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetSerial", FieldKey = "Serial", UiFieldDataType = (int)AyaUiFieldDataType.Integer });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetDollarAmount", FieldKey = "DollarAmount", UiFieldDataType = (int)AyaUiFieldDataType.Currency });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCount", FieldKey = "Count", UiFieldDataType = (int)AyaUiFieldDataType.Integer });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetRoles", FieldKey = "Roles", UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(AuthorizationRoles).ToString() });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetStartDate", FieldKey = "StartDate", UiFieldDataType = (int)AyaUiFieldDataType.DateTime });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetEndDate", FieldKey = "EndDate", UiFieldDataType = (int)AyaUiFieldDataType.DateTime });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetNotes", FieldKey = "Notes", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "df", AyaObjectType = (int)AyaType.Widget });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetName", FieldKey = "Name", UiFieldDataType = (int)AyaUiFieldDataType.Text, Hideable = false });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetSerial", FieldKey = "Serial", UiFieldDataType = (int)AyaUiFieldDataType.Integer });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetDollarAmount", FieldKey = "DollarAmount", UiFieldDataType = (int)AyaUiFieldDataType.Currency });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCount", FieldKey = "Count", UiFieldDataType = (int)AyaUiFieldDataType.Integer });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetRoles", FieldKey = "Roles", UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(AuthorizationRoles).ToString() });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetStartDate", FieldKey = "StartDate", UiFieldDataType = (int)AyaUiFieldDataType.DateTime });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetEndDate", FieldKey = "EndDate", UiFieldDataType = (int)AyaUiFieldDataType.DateTime });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetNotes", FieldKey = "Notes", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
|
|
|
|
//More to do on this, maybe the datatype should be a LINK or something for UI purposes
|
|
|
|
|
//circle back on this when there is enough infrastructure to test
|
|
|
|
|
l.Add(new AyaField { LtKey = "User", FieldKey = "userid", UiFieldDataType = (int)AyaUiFieldDataType.Text, AyaObjectType = (int)AyaType.User });
|
|
|
|
|
l.Add(new AyaField { LtKey = "Active", FieldKey = "Active", UiFieldDataType = (int)AyaUiFieldDataType.Bool, Hideable = false });
|
|
|
|
|
l.Add(new AyaField { LtKey = "Tags", FieldKey = "Tags", UiFieldDataType = (int)AyaUiFieldDataType.Tags });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "User", FieldKey = "userid", UiFieldDataType = (int)AyaUiFieldDataType.Text, AyaObjectType = (int)AyaType.User });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "Active", FieldKey = "Active", UiFieldDataType = (int)AyaUiFieldDataType.Bool, Hideable = false });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "Tags", FieldKey = "Tags", UiFieldDataType = (int)AyaUiFieldDataType.Tags });
|
|
|
|
|
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom1", FieldKey = "WidgetCustom1", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom2", FieldKey = "WidgetCustom2", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom3", FieldKey = "WidgetCustom3", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom4", FieldKey = "WidgetCustom4", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom5", FieldKey = "WidgetCustom5", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom6", FieldKey = "WidgetCustom6", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom7", FieldKey = "WidgetCustom7", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom8", FieldKey = "WidgetCustom8", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom9", FieldKey = "WidgetCustom9", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom10", FieldKey = "WidgetCustom10", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom11", FieldKey = "WidgetCustom11", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom12", FieldKey = "WidgetCustom12", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom13", FieldKey = "WidgetCustom13", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom14", FieldKey = "WidgetCustom14", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom15", FieldKey = "WidgetCustom15", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "WidgetCustom16", FieldKey = "WidgetCustom16", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom1", FieldKey = "WidgetCustom1", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom2", FieldKey = "WidgetCustom2", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom3", FieldKey = "WidgetCustom3", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom4", FieldKey = "WidgetCustom4", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom5", FieldKey = "WidgetCustom5", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom6", FieldKey = "WidgetCustom6", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom7", FieldKey = "WidgetCustom7", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom8", FieldKey = "WidgetCustom8", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom9", FieldKey = "WidgetCustom9", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom10", FieldKey = "WidgetCustom10", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom11", FieldKey = "WidgetCustom11", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom12", FieldKey = "WidgetCustom12", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom13", FieldKey = "WidgetCustom13", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom14", FieldKey = "WidgetCustom14", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom15", FieldKey = "WidgetCustom15", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "WidgetCustom16", FieldKey = "WidgetCustom16", IsCustomField = true });
|
|
|
|
|
break;
|
|
|
|
|
#endregion
|
|
|
|
|
case USER_KEY:
|
|
|
|
|
#region USER_KEY
|
|
|
|
|
l.Add(new AyaField { LtKey = "df", AyaObjectType = (int)AyaType.User });
|
|
|
|
|
l.Add(new AyaField { LtKey = "Name", FieldKey = "Name", UiFieldDataType = (int)AyaUiFieldDataType.Text, Hideable = false });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserEmployeeNumber", FieldKey = "EmployeeNumber", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
|
|
|
|
l.Add(new AyaField { LtKey = "AuthorizationRoles", FieldKey = "Roles", Hideable = false, UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(AuthorizationRoles).ToString() });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserNotes", FieldKey = "Notes", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserUserType", FieldKey = "UserType", Hideable = false, UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(UserType).ToString() });
|
|
|
|
|
l.Add(new AyaField { LtKey = "Active", FieldKey = "Active", UiFieldDataType = (int)AyaUiFieldDataType.Bool, Hideable = false });
|
|
|
|
|
l.Add(new AyaField { LtKey = "Tags", FieldKey = "Tags", UiFieldDataType = (int)AyaUiFieldDataType.Tags });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "df", AyaObjectType = (int)AyaType.User });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "Name", FieldKey = "Name", UiFieldDataType = (int)AyaUiFieldDataType.Text, Hideable = false });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserEmployeeNumber", FieldKey = "EmployeeNumber", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "AuthorizationRoles", FieldKey = "Roles", Hideable = false, UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(AuthorizationRoles).ToString() });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserNotes", FieldKey = "Notes", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserUserType", FieldKey = "UserType", Hideable = false, UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(UserType).ToString() });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "Active", FieldKey = "Active", UiFieldDataType = (int)AyaUiFieldDataType.Bool, Hideable = false });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "Tags", FieldKey = "Tags", UiFieldDataType = (int)AyaUiFieldDataType.Tags });
|
|
|
|
|
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom1", FieldKey = "UserCustom1", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom2", FieldKey = "UserCustom2", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom3", FieldKey = "UserCustom3", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom4", FieldKey = "UserCustom4", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom5", FieldKey = "UserCustom5", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom6", FieldKey = "UserCustom6", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom7", FieldKey = "UserCustom7", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom8", FieldKey = "UserCustom8", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom9", FieldKey = "UserCustom9", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom10", FieldKey = "UserCustom10", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom11", FieldKey = "UserCustom11", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom12", FieldKey = "UserCustom12", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom13", FieldKey = "UserCustom13", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom14", FieldKey = "UserCustom14", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom15", FieldKey = "UserCustom15", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaField { LtKey = "UserCustom16", FieldKey = "UserCustom16", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom1", FieldKey = "UserCustom1", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom2", FieldKey = "UserCustom2", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom3", FieldKey = "UserCustom3", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom4", FieldKey = "UserCustom4", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom5", FieldKey = "UserCustom5", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom6", FieldKey = "UserCustom6", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom7", FieldKey = "UserCustom7", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom8", FieldKey = "UserCustom8", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom9", FieldKey = "UserCustom9", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom10", FieldKey = "UserCustom10", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom11", FieldKey = "UserCustom11", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom12", FieldKey = "UserCustom12", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom13", FieldKey = "UserCustom13", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom14", FieldKey = "UserCustom14", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom15", FieldKey = "UserCustom15", IsCustomField = true });
|
|
|
|
|
l.Add(new AyaFieldDefinition { LtKey = "UserCustom16", FieldKey = "UserCustom16", IsCustomField = true });
|
|
|
|
|
break;
|
|
|
|
|
#endregion
|
|
|
|
|
case TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY:
|
|
|
|
|
#region TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY
|
|
|
|
|
|
|
|
|
|
l.Add(new AyaField { FieldKey = "df", AyaObjectType = (int)AyaType.Widget, SqlIdColumnName = "awidget.id" });
|
|
|
|
|
l.Add(new AyaField
|
|
|
|
|
l.Add(new AyaFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.Widget, SqlIdColumnName = "awidget.id" });
|
|
|
|
|
l.Add(new AyaFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
FieldKey = "widgetname",
|
|
|
|
|
LtKey = "WidgetName",
|
|
|
|
|
@@ -232,7 +232,7 @@ namespace AyaNova.Biz
|
|
|
|
|
SqlIdColumnName = "awidget.id",
|
|
|
|
|
SqlDisplayColumnName = "awidget.name"
|
|
|
|
|
});
|
|
|
|
|
l.Add(new AyaField
|
|
|
|
|
l.Add(new AyaFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
FieldKey = "username",
|
|
|
|
|
LtKey = "User",
|
|
|
|
|
@@ -241,7 +241,7 @@ namespace AyaNova.Biz
|
|
|
|
|
SqlIdColumnName = "auser.id",
|
|
|
|
|
SqlDisplayColumnName = "auser.name"
|
|
|
|
|
});
|
|
|
|
|
l.Add(new AyaField
|
|
|
|
|
l.Add(new AyaFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
LtKey = "UserEmailAddress",
|
|
|
|
|
FieldKey = "emailaddress",
|
|
|
|
|
@@ -301,7 +301,7 @@ namespace AyaNova.Biz
|
|
|
|
|
|
|
|
|
|
foreach (string s in fullFields)
|
|
|
|
|
{
|
|
|
|
|
AyaField o = fields.FirstOrDefault(x => x.FieldKey == s);
|
|
|
|
|
AyaFieldDefinition o = fields.FirstOrDefault(x => x.FieldKey == s);
|
|
|
|
|
#if (DEBUG)
|
|
|
|
|
//Developers little helper
|
|
|
|
|
if (o == null)
|
|
|
|
|
@@ -335,7 +335,7 @@ namespace AyaNova.Biz
|
|
|
|
|
|
|
|
|
|
}//eoc ObjectFields
|
|
|
|
|
|
|
|
|
|
public class AyaField
|
|
|
|
|
public class AyaFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
//CLIENT / SERVER Unique identifier used at BOTH client and server
|
|
|
|
|
//also the sql displaycolumnname if identical
|
|
|
|
|
@@ -370,7 +370,7 @@ namespace AyaNova.Biz
|
|
|
|
|
public string SqlDisplayColumnName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public AyaField()
|
|
|
|
|
public AyaFieldDefinition()
|
|
|
|
|
{
|
|
|
|
|
//most common defaults
|
|
|
|
|
Hideable = true;
|
|
|
|
|
|