This commit is contained in:
@@ -6,7 +6,7 @@ using System.Text;
|
|||||||
namespace AyaNova.Biz
|
namespace AyaNova.Biz
|
||||||
{
|
{
|
||||||
//************************************************
|
//************************************************
|
||||||
// This contains all the fields that are customizable on forms
|
// This contains all the fields that are customizable on all object edit forms
|
||||||
// it is used for both validation and driving the UI etc
|
// it is used for both validation and driving the UI etc
|
||||||
//See the DataList folder / namespace for LIST related similar class
|
//See the DataList folder / namespace for LIST related similar class
|
||||||
|
|
||||||
@@ -49,20 +49,20 @@ 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
|
//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
|
//in this case the default of id is sufficient for this list
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "df", AyaObjectType = (int)AyaType.Widget });
|
l.Add(new AyaFormFieldDefinition { LtKey = "df" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetName", FieldKey = "Name", UiFieldDataType = (int)AyaUiFieldDataType.Text, Hideable = false });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetName", FieldKey = "Name" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetSerial", FieldKey = "Serial", UiFieldDataType = (int)AyaUiFieldDataType.Integer });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetSerial", FieldKey = "Serial" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetDollarAmount", FieldKey = "DollarAmount", UiFieldDataType = (int)AyaUiFieldDataType.Currency });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetDollarAmount", FieldKey = "DollarAmount" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetCount", FieldKey = "Count", UiFieldDataType = (int)AyaUiFieldDataType.Integer });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetCount", FieldKey = "Count" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetRoles", FieldKey = "Roles", UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(AuthorizationRoles).ToString() });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetRoles", FieldKey = "Roles" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetStartDate", FieldKey = "StartDate", UiFieldDataType = (int)AyaUiFieldDataType.DateTime });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetStartDate", FieldKey = "StartDate" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetEndDate", FieldKey = "EndDate", UiFieldDataType = (int)AyaUiFieldDataType.DateTime });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetEndDate", FieldKey = "EndDate" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetNotes", FieldKey = "Notes", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetNotes", FieldKey = "Notes" });
|
||||||
//More to do on this, maybe the datatype should be a LINK or something for UI purposes
|
//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
|
//circle back on this when there is enough infrastructure to test
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "User", FieldKey = "userid", UiFieldDataType = (int)AyaUiFieldDataType.Text, AyaObjectType = (int)AyaType.User });
|
l.Add(new AyaFormFieldDefinition { LtKey = "User", FieldKey = "userid" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "Active", FieldKey = "Active", UiFieldDataType = (int)AyaUiFieldDataType.Bool, Hideable = false });
|
l.Add(new AyaFormFieldDefinition { LtKey = "Active", FieldKey = "Active", Hideable = false });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "Tags", FieldKey = "Tags", UiFieldDataType = (int)AyaUiFieldDataType.Tags });
|
l.Add(new AyaFormFieldDefinition { LtKey = "Tags", FieldKey = "Tags" });
|
||||||
|
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetCustom1", FieldKey = "WidgetCustom1", IsCustomField = true });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetCustom1", FieldKey = "WidgetCustom1", IsCustomField = true });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetCustom2", FieldKey = "WidgetCustom2", IsCustomField = true });
|
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetCustom2", FieldKey = "WidgetCustom2", IsCustomField = true });
|
||||||
@@ -84,14 +84,14 @@ namespace AyaNova.Biz
|
|||||||
#endregion
|
#endregion
|
||||||
case USER_KEY:
|
case USER_KEY:
|
||||||
#region USER_KEY
|
#region USER_KEY
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "df", AyaObjectType = (int)AyaType.User });
|
l.Add(new AyaFormFieldDefinition { LtKey = "df" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "Name", FieldKey = "Name", UiFieldDataType = (int)AyaUiFieldDataType.Text, Hideable = false });
|
l.Add(new AyaFormFieldDefinition { LtKey = "Name", FieldKey = "Name", Hideable = false });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "UserEmployeeNumber", FieldKey = "EmployeeNumber", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
l.Add(new AyaFormFieldDefinition { LtKey = "UserEmployeeNumber", FieldKey = "EmployeeNumber" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "AuthorizationRoles", FieldKey = "Roles", Hideable = false, UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(AuthorizationRoles).ToString() });
|
l.Add(new AyaFormFieldDefinition { LtKey = "AuthorizationRoles", FieldKey = "Roles", Hideable = false });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "UserNotes", FieldKey = "Notes", UiFieldDataType = (int)AyaUiFieldDataType.Text });
|
l.Add(new AyaFormFieldDefinition { LtKey = "UserNotes", FieldKey = "Notes" });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "UserUserType", FieldKey = "UserType", Hideable = false, UiFieldDataType = (int)AyaUiFieldDataType.Enum, EnumType = typeof(UserType).ToString() });
|
l.Add(new AyaFormFieldDefinition { LtKey = "UserUserType", FieldKey = "UserType", Hideable = false });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "Active", FieldKey = "Active", UiFieldDataType = (int)AyaUiFieldDataType.Bool, Hideable = false });
|
l.Add(new AyaFormFieldDefinition { LtKey = "Active", FieldKey = "Active", Hideable = false });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "Tags", FieldKey = "Tags", UiFieldDataType = (int)AyaUiFieldDataType.Tags });
|
l.Add(new AyaFormFieldDefinition { LtKey = "Tags", FieldKey = "Tags" });
|
||||||
|
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "UserCustom1", FieldKey = "UserCustom1", IsCustomField = true });
|
l.Add(new AyaFormFieldDefinition { LtKey = "UserCustom1", FieldKey = "UserCustom1", IsCustomField = true });
|
||||||
l.Add(new AyaFormFieldDefinition { LtKey = "UserCustom2", FieldKey = "UserCustom2", IsCustomField = true });
|
l.Add(new AyaFormFieldDefinition { LtKey = "UserCustom2", FieldKey = "UserCustom2", IsCustomField = true });
|
||||||
@@ -120,7 +120,6 @@ namespace AyaNova.Biz
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static string TranslateLTCustomFieldToInternalCustomFieldName(string lTCustomFieldName)
|
public static string TranslateLTCustomFieldToInternalCustomFieldName(string lTCustomFieldName)
|
||||||
{
|
{
|
||||||
var i = System.Convert.ToInt32(System.Text.RegularExpressions.Regex.Replace(
|
var i = System.Convert.ToInt32(System.Text.RegularExpressions.Regex.Replace(
|
||||||
@@ -132,12 +131,6 @@ namespace AyaNova.Biz
|
|||||||
return $"c{i}";
|
return $"c{i}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}//eoc ObjectFields
|
}//eoc ObjectFields
|
||||||
|
|
||||||
public class AyaFormFieldDefinition
|
public class AyaFormFieldDefinition
|
||||||
@@ -155,40 +148,14 @@ namespace AyaNova.Biz
|
|||||||
//CLIENT / SERVER - client display server validation purposes
|
//CLIENT / SERVER - client display server validation purposes
|
||||||
public bool IsCustomField { get; set; }
|
public bool IsCustomField { get; set; }
|
||||||
|
|
||||||
// //CLIENT / SERVER - client display server validation purposes
|
|
||||||
// public bool IsFilterable { get; set; }
|
|
||||||
|
|
||||||
// //CLIENT / SERVER - client display server validation purposes
|
|
||||||
// public bool IsSortable { get; set; }
|
|
||||||
|
|
||||||
//CLIENT Use only for display
|
|
||||||
public int UiFieldDataType { get; set; }
|
|
||||||
|
|
||||||
//CLIENT Use only for display
|
|
||||||
public string EnumType { get; set; }
|
|
||||||
|
|
||||||
//CLIENT / SERVER - client display and to indicate what object to open , Server for formatting return object
|
|
||||||
public int AyaObjectType { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AyaFormFieldDefinition()
|
public AyaFormFieldDefinition()
|
||||||
{
|
{
|
||||||
//most common defaults
|
//most common defaults
|
||||||
Hideable = true;
|
Hideable = true;
|
||||||
IsCustomField = false;
|
IsCustomField = false;
|
||||||
// IsFilterable = true;
|
|
||||||
// IsSortable = true;
|
|
||||||
//Set openable object type to no type which is the default and means it's not a link to another object
|
|
||||||
AyaObjectType = (int)AyaType.NoType;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}//eoc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}//ens
|
}//ens
|
||||||
|
|||||||
Reference in New Issue
Block a user