This commit is contained in:
2020-01-17 00:42:22 +00:00
parent 05427f2f98
commit d1afda396f
2 changed files with 149 additions and 99 deletions

View File

@@ -226,42 +226,27 @@ namespace AyaNova.Biz
from awidget
left outer join auser on (awidget.userid=auser.id)
left outer join auseroptions on (auser.id=auseroptions.userid)
public string Key { get; set; }
public string PropertyName { get; set; }
public bool Hideable { get; set; }
public bool SharedLTKey { get; set; }
public bool Custom { get; set; }
public bool Filterable { get; set; }
public bool Sortable { get; set; }
public bool MiniAvailable { get; set; }
public int UiFieldDataType { get; set; }
//If it's an enum DataType then this is the specific enum type which sb the name of the class that holds the enum in the server project
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; }
//For query building
//This is the equivalent of the v7 SqlColumnNameAttribute
public string SqlIdColumn { get; set; }
public string SqlColumn { get; set; }
*/
//THIS is strictly a list object, not for forms so it doesn't need hideable set to any as that's a customization thing
l.Add(new ObjectField { Key = "df", AyObjectType = (int)AyaType.Widget });
l.Add(new ObjectField
{
Key = "WidgetName",
PropertyName = "widgetname",
UiFieldDataType = (int)AyaUiFieldDataType.Text,
Hideable = false,
PropertyName = "widgetname",//same as sql display column so no need to specify both
UiFieldDataType = (int)AyaUiFieldDataType.Text,
AyObjectType = (int)AyaType.Widget,
SqlIdColumn = "widgetid",
SqlDisplayColumn = "widgetname"
});//not hideable for strictly list must mean it has to be in template?
l.Add(new ObjectField { Key = "User", PropertyName = "userid", UiFieldDataType = (int)AyaUiFieldDataType.Text, AyObjectType = (int)AyaType.User });
l.Add(new ObjectField { Key = "Name", PropertyName = "Name", SharedLTKey = true, UiFieldDataType = (int)AyaUiFieldDataType.Text, Hideable = false });
l.Add(new ObjectField { Key = "UserEmailAddress", PropertyName = "Emailaddress", UiFieldDataType = (int)AyaUiFieldDataType.EmailAddress, SqlDisplayColumn = "emailaddress" });
SqlIdColumn = "widgetid"
});
l.Add(new ObjectField
{
Key = "User",
PropertyName = "username",//same as sql display column so no need to specify both
UiFieldDataType = (int)AyaUiFieldDataType.Text,
AyObjectType = (int)AyaType.User,
SqlIdColumn = "userid"
});
l.Add(new ObjectField { Key = "UserEmailAddress", PropertyName = "emailaddress", UiFieldDataType = (int)AyaUiFieldDataType.EmailAddress});
break;
#endregion
@@ -358,8 +343,8 @@ namespace AyaNova.Biz
public bool Custom { get; set; }
public bool Filterable { get; set; }
public bool Sortable { get; set; }
//had this but don't know why
//if a user wants to shove a bunch of notes into a single column with other shit that's their lookout surely
//had this but don't know why
//if a user wants to shove a bunch of notes into a single column with other shit that's their lookout surely
//public bool MiniAvailable { get; set; }
public int UiFieldDataType { get; set; }
//If it's an enum DataType then this is the specific enum type which sb the name of the class that holds the enum in the server project
@@ -380,13 +365,14 @@ namespace AyaNova.Biz
SharedLTKey = false;
Hideable = true;
Custom = false;
Filterable = true;
Sortable = true;
Filterable = true;
Sortable = 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;
}
//Get column to query for display name or use PropertyName if there is no difference
public string GetSqlDisplayColumnName()
{
if (string.IsNullOrEmpty(SqlDisplayColumn))