105 lines
7.1 KiB
C#
105 lines
7.1 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class ProjectDataList : DataListProcessingBase
|
|
{
|
|
public ProjectDataList(long translationId)
|
|
{
|
|
DefaultListAType = AyaType.Project;
|
|
SQLFrom = "from aproject left join auser on (aproject.projectoverseerid=auser.id)";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() { "projectname", "ProjectProjectOverseerID", "ProjectDateStarted", "ProjectDateCompleted",
|
|
"ProjectAccountNumber", "projectactive", "projecttags" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "projectname", "+" } };
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ProjectName",
|
|
FieldKey = "projectname",
|
|
AType = (int)AyaType.Project,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "aproject.id",
|
|
SqlValueColumnName = "aproject.name",
|
|
IsRowId = true
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ProjectNotes",
|
|
FieldKey = "projectnotes",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aproject.notes"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Active",
|
|
FieldKey = "projectactive",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "aproject.active"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Tags",
|
|
FieldKey = "projecttags",
|
|
UiFieldDataType = (int)UiFieldDataType.Tags,
|
|
SqlValueColumnName = "aproject.tags"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ProjectAccountNumber",
|
|
FieldKey = "ProjectAccountNumber",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aproject.accountnumber"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
FieldKey = "ProjectProjectOverseerID",
|
|
TKey = "ProjectProjectOverseerID",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
AType = (int)AyaType.User,
|
|
SqlIdColumnName = "auser.id",
|
|
SqlValueColumnName = "auser.name"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ProjectDateStarted",
|
|
FieldKey = "ProjectDateStarted",
|
|
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
|
SqlValueColumnName = "aproject.datestarted"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ProjectDateCompleted",
|
|
FieldKey = "ProjectDateCompleted",
|
|
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
|
SqlValueColumnName = "aproject.datecompleted"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom1", FieldKey = "projectcustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom2", FieldKey = "projectcustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom3", FieldKey = "projectcustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom4", FieldKey = "projectcustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom5", FieldKey = "projectcustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom6", FieldKey = "projectcustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom7", FieldKey = "projectcustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom8", FieldKey = "projectcustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom9", FieldKey = "projectcustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom10", FieldKey = "projectcustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom11", FieldKey = "projectcustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom12", FieldKey = "projectcustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom13", FieldKey = "projectcustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom14", FieldKey = "projectcustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom15", FieldKey = "projectcustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ProjectCustom16", FieldKey = "projectcustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aproject.customfields" });
|
|
}
|
|
}//eoc
|
|
}//eons |