using System.Collections.Generic;
using System;

namespace AyaNova.Biz
{
    //************************************************
    // This contains all the fields that are customizable on all object edit forms   
    // it is used for both validation and driving the UI etc
    //See the DataList folder / namespace for LIST related similar class

    public static class AyaFormFieldDefinitions
    {
        private static Dictionary<string, List<AyaFormFieldDefinition>> _ayaFormFields;
        public static List<string> AyaFormFieldDefinitionKeys
        {
            get
            {
                //return the names of all AyaTypes that have the corebizobject attribute
                List<string> l = new List<string>();
                var values = Enum.GetValues(typeof(AyaType));
                foreach (AyaType t in values)
                {
                    if (t.HasAttribute(typeof(CoreBizObjectAttribute)))
                    {
                        l.Add(t.ToString());
                    }
                }


                return l;
            }
        }


        public static bool IsValidFormFieldDefinitionKey(string key)
        {
            return AyaFormFieldDefinitionKeys.Contains(key);
        }

        public static List<AyaFormFieldDefinition> AyaFormFields(string key)
        {
            //Initialize the static list here on first retrieval
            if (_ayaFormFields == null)
            {
                _ayaFormFields = new Dictionary<string, List<AyaFormFieldDefinition>>();
                /*  *****************************  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
                    *****************************  Otherwise the hidden field can't be set and the object can't be saved EVER        
                */
                #region WIDGET_KEY
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetName", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetSerial", FieldKey = "Serial" });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetDollarAmount", FieldKey = "DollarAmount" });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCount", FieldKey = "Count" });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserType", FieldKey = "UserType" });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetStartDate", FieldKey = "StartDate" });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetEndDate", FieldKey = "EndDate" });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetNotes", FieldKey = "Notes" });
                    //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 AyaFormFieldDefinition { TKey = "User", FieldKey = "UserId" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom1", FieldKey = "WidgetCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom2", FieldKey = "WidgetCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom3", FieldKey = "WidgetCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom4", FieldKey = "WidgetCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom5", FieldKey = "WidgetCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom6", FieldKey = "WidgetCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom7", FieldKey = "WidgetCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom8", FieldKey = "WidgetCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom9", FieldKey = "WidgetCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom10", FieldKey = "WidgetCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom11", FieldKey = "WidgetCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom12", FieldKey = "WidgetCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom13", FieldKey = "WidgetCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom14", FieldKey = "WidgetCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom15", FieldKey = "WidgetCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WidgetCustom16", FieldKey = "WidgetCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.Widget.ToString(), l);
                }
                #endregion widget

                #region USER_KEY
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserEmployeeNumber", FieldKey = "EmployeeNumber" });
                    l.Add(new AyaFormFieldDefinition { TKey = "AuthorizationRoles", FieldKey = "Roles", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserType", FieldKey = "UserType", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "LastLogin", FieldKey = "LastLogin" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom1", FieldKey = "UserCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom2", FieldKey = "UserCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom3", FieldKey = "UserCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom4", FieldKey = "UserCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom5", FieldKey = "UserCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom6", FieldKey = "UserCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom7", FieldKey = "UserCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom8", FieldKey = "UserCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom9", FieldKey = "UserCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom10", FieldKey = "UserCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom11", FieldKey = "UserCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom12", FieldKey = "UserCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom13", FieldKey = "UserCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom14", FieldKey = "UserCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom15", FieldKey = "UserCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UserCustom16", FieldKey = "UserCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.User.ToString(), l);
                }
                #endregion

                #region Customer
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom1", FieldKey = "CustomerCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom2", FieldKey = "CustomerCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom3", FieldKey = "CustomerCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom4", FieldKey = "CustomerCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom5", FieldKey = "CustomerCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom6", FieldKey = "CustomerCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom7", FieldKey = "CustomerCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom8", FieldKey = "CustomerCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom9", FieldKey = "CustomerCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom10", FieldKey = "CustomerCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom11", FieldKey = "CustomerCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom12", FieldKey = "CustomerCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom13", FieldKey = "CustomerCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom14", FieldKey = "CustomerCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom15", FieldKey = "CustomerCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "CustomerCustom16", FieldKey = "CustomerCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.Customer.ToString(), l);
                }
                #endregion

                #region HeadOffice
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom1", FieldKey = "HeadOfficeCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom2", FieldKey = "HeadOfficeCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom3", FieldKey = "HeadOfficeCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom4", FieldKey = "HeadOfficeCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom5", FieldKey = "HeadOfficeCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom6", FieldKey = "HeadOfficeCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom7", FieldKey = "HeadOfficeCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom8", FieldKey = "HeadOfficeCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom9", FieldKey = "HeadOfficeCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom10", FieldKey = "HeadOfficeCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom11", FieldKey = "HeadOfficeCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom12", FieldKey = "HeadOfficeCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom13", FieldKey = "HeadOfficeCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom14", FieldKey = "HeadOfficeCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom15", FieldKey = "HeadOfficeCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "HeadOfficeCustom16", FieldKey = "HeadOfficeCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.HeadOffice.ToString(), l);
                }
                #endregion

                #region Contract
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom1", FieldKey = "ContractCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom2", FieldKey = "ContractCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom3", FieldKey = "ContractCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom4", FieldKey = "ContractCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom5", FieldKey = "ContractCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom6", FieldKey = "ContractCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom7", FieldKey = "ContractCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom8", FieldKey = "ContractCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom9", FieldKey = "ContractCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom10", FieldKey = "ContractCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom11", FieldKey = "ContractCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom12", FieldKey = "ContractCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom13", FieldKey = "ContractCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom14", FieldKey = "ContractCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom15", FieldKey = "ContractCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ContractCustom16", FieldKey = "ContractCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.Contract.ToString(), l);
                }
                #endregion

                #region LoanUnit
                {

                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom1", FieldKey = "LoanUnitCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom2", FieldKey = "LoanUnitCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom3", FieldKey = "LoanUnitCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom4", FieldKey = "LoanUnitCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom5", FieldKey = "LoanUnitCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom6", FieldKey = "LoanUnitCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom7", FieldKey = "LoanUnitCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom8", FieldKey = "LoanUnitCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom9", FieldKey = "LoanUnitCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom10", FieldKey = "LoanUnitCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom11", FieldKey = "LoanUnitCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom12", FieldKey = "LoanUnitCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom13", FieldKey = "LoanUnitCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom14", FieldKey = "LoanUnitCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom15", FieldKey = "LoanUnitCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCustom16", FieldKey = "LoanUnitCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.LoanUnit.ToString(), l);

                }
                #endregion

                #region Part
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom1", FieldKey = "PartCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom2", FieldKey = "PartCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom3", FieldKey = "PartCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom4", FieldKey = "PartCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom5", FieldKey = "PartCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom6", FieldKey = "PartCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom7", FieldKey = "PartCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom8", FieldKey = "PartCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom9", FieldKey = "PartCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom10", FieldKey = "PartCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom11", FieldKey = "PartCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom12", FieldKey = "PartCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom13", FieldKey = "PartCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom14", FieldKey = "PartCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom15", FieldKey = "PartCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PartCustom16", FieldKey = "PartCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.Part.ToString(), l);

                }
                #endregion

                #region Project
                {

                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom1", FieldKey = "ProjectCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom2", FieldKey = "ProjectCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom3", FieldKey = "ProjectCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom4", FieldKey = "ProjectCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom5", FieldKey = "ProjectCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom6", FieldKey = "ProjectCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom7", FieldKey = "ProjectCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom8", FieldKey = "ProjectCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom9", FieldKey = "ProjectCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom10", FieldKey = "ProjectCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom11", FieldKey = "ProjectCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom12", FieldKey = "ProjectCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom13", FieldKey = "ProjectCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom14", FieldKey = "ProjectCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom15", FieldKey = "ProjectCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "ProjectCustom16", FieldKey = "ProjectCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.Project.ToString(), l);

                }
                #endregion

                #region PurchaseOrder
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom1", FieldKey = "PurchaseOrderCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom2", FieldKey = "PurchaseOrderCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom3", FieldKey = "PurchaseOrderCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom4", FieldKey = "PurchaseOrderCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom5", FieldKey = "PurchaseOrderCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom6", FieldKey = "PurchaseOrderCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom7", FieldKey = "PurchaseOrderCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom8", FieldKey = "PurchaseOrderCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom9", FieldKey = "PurchaseOrderCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom10", FieldKey = "PurchaseOrderCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom11", FieldKey = "PurchaseOrderCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom12", FieldKey = "PurchaseOrderCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom13", FieldKey = "PurchaseOrderCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom14", FieldKey = "PurchaseOrderCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom15", FieldKey = "PurchaseOrderCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "PurchaseOrderCustom16", FieldKey = "PurchaseOrderCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.PurchaseOrder.ToString(), l);

                }
                #endregion

                #region Unit
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom1", FieldKey = "UnitCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom2", FieldKey = "UnitCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom3", FieldKey = "UnitCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom4", FieldKey = "UnitCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom5", FieldKey = "UnitCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom6", FieldKey = "UnitCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom7", FieldKey = "UnitCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom8", FieldKey = "UnitCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom9", FieldKey = "UnitCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom10", FieldKey = "UnitCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom11", FieldKey = "UnitCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom12", FieldKey = "UnitCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom13", FieldKey = "UnitCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom14", FieldKey = "UnitCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom15", FieldKey = "UnitCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitCustom16", FieldKey = "UnitCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.Unit.ToString(), l);

                }
                #endregion

                #region UnitModel
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom1", FieldKey = "UnitModelCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom2", FieldKey = "UnitModelCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom3", FieldKey = "UnitModelCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom4", FieldKey = "UnitModelCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom5", FieldKey = "UnitModelCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom6", FieldKey = "UnitModelCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom7", FieldKey = "UnitModelCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom8", FieldKey = "UnitModelCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom9", FieldKey = "UnitModelCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom10", FieldKey = "UnitModelCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom11", FieldKey = "UnitModelCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom12", FieldKey = "UnitModelCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom13", FieldKey = "UnitModelCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom14", FieldKey = "UnitModelCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom15", FieldKey = "UnitModelCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "UnitModelCustom16", FieldKey = "UnitModelCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.UnitModel.ToString(), l);

                }
                #endregion

                #region Vendor
                {

                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom1", FieldKey = "VendorCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom2", FieldKey = "VendorCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom3", FieldKey = "VendorCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom4", FieldKey = "VendorCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom5", FieldKey = "VendorCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom6", FieldKey = "VendorCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom7", FieldKey = "VendorCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom8", FieldKey = "VendorCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom9", FieldKey = "VendorCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom10", FieldKey = "VendorCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom11", FieldKey = "VendorCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom12", FieldKey = "VendorCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom13", FieldKey = "VendorCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom14", FieldKey = "VendorCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom15", FieldKey = "VendorCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "VendorCustom16", FieldKey = "VendorCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.Vendor.ToString(), l);

                }
                #endregion

                #region WorkOrder
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderSerial", FieldKey = "Serial", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom1", FieldKey = "WorkOrderCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom2", FieldKey = "WorkOrderCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom3", FieldKey = "WorkOrderCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom4", FieldKey = "WorkOrderCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom5", FieldKey = "WorkOrderCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom6", FieldKey = "WorkOrderCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom7", FieldKey = "WorkOrderCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom8", FieldKey = "WorkOrderCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom9", FieldKey = "WorkOrderCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom10", FieldKey = "WorkOrderCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom11", FieldKey = "WorkOrderCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom12", FieldKey = "WorkOrderCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom13", FieldKey = "WorkOrderCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom14", FieldKey = "WorkOrderCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom15", FieldKey = "WorkOrderCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderCustom16", FieldKey = "WorkOrderCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.WorkOrder.ToString(), l);

                }
                #endregion

                #region WorkOrderItem
                {
                    List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
                    l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemNotes", FieldKey = "Notes" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
                    l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
                    l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });

                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom1", FieldKey = "WorkOrderItemCustom1", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom2", FieldKey = "WorkOrderItemCustom2", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom3", FieldKey = "WorkOrderItemCustom3", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom4", FieldKey = "WorkOrderItemCustom4", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom5", FieldKey = "WorkOrderItemCustom5", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom6", FieldKey = "WorkOrderItemCustom6", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom7", FieldKey = "WorkOrderItemCustom7", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom8", FieldKey = "WorkOrderItemCustom8", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom9", FieldKey = "WorkOrderItemCustom9", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom10", FieldKey = "WorkOrderItemCustom10", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom11", FieldKey = "WorkOrderItemCustom11", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom12", FieldKey = "WorkOrderItemCustom12", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom13", FieldKey = "WorkOrderItemCustom13", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom14", FieldKey = "WorkOrderItemCustom14", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom15", FieldKey = "WorkOrderItemCustom15", IsCustomField = true });
                    l.Add(new AyaFormFieldDefinition { TKey = "WorkOrderItemCustom16", FieldKey = "WorkOrderItemCustom16", IsCustomField = true });
                    _ayaFormFields.Add(AyaType.WorkOrderItem.ToString(), l);

                }
                #endregion
                //******************************************************
            }

            if (!_ayaFormFields.ContainsKey(key))
                throw new System.ArgumentOutOfRangeException($"AyaFormFieldDefinitions: {key} is not valid");
            return _ayaFormFields[key];

        }

        public static string TranslateLTCustomFieldToInternalCustomFieldName(string lTCustomFieldName)
        {
            var i = System.Convert.ToInt32(System.Text.RegularExpressions.Regex.Replace(
                        lTCustomFieldName,  // Our input
                        "[^0-9]", // Select everything that is not in the range of 0-9
                        ""        // Replace that with an empty string.
                    ));

            return $"c{i}";
        }

    }//eoc ObjectFields

    public class AyaFormFieldDefinition
    {
        //CLIENT / SERVER Unique identifier used at BOTH client and server
        //also the sql displaycolumnname if identical
        public string FieldKey { get; set; }

        //CLIENT Use only for display
        public string TKey { get; set; }

        //CLIENT form customization
        public bool Hideable { get; set; }

        //CLIENT / SERVER - client display server validation purposes
        public bool IsCustomField { get; set; }


        public AyaFormFieldDefinition()
        {
            //most common defaults           
            Hideable = true;
            IsCustomField = false;
        }
    }//eoc


}//ens
