81 lines
5.9 KiB
C#
81 lines
5.9 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class ContractDataList : DataListProcessingBase
|
|
{
|
|
public ContractDataList()
|
|
{
|
|
DefaultListAType = AyaType.Contract;
|
|
SQLFrom = "from acontract";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() { "contractname", "contractactive" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "contractname", "+" } };
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ContractName",
|
|
FieldKey = "contractname",
|
|
AType = (int)AyaType.Contract,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "acontract.id",
|
|
SqlValueColumnName = "acontract.name",
|
|
IsRowId = true
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ContractNotes",
|
|
FieldKey = "contractnotes",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "acontract.notes"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Active",
|
|
FieldKey = "contractactive",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "acontract.active"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Tags",
|
|
FieldKey = "contracttags",
|
|
UiFieldDataType = (int)UiFieldDataType.Tags,
|
|
SqlValueColumnName = "acontract.tags"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AlertNotes",
|
|
FieldKey = "AlertNotes",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "acontract.alertnotes"
|
|
});
|
|
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom1", FieldKey = "contractcustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom2", FieldKey = "contractcustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom3", FieldKey = "contractcustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom4", FieldKey = "contractcustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom5", FieldKey = "contractcustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom6", FieldKey = "contractcustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom7", FieldKey = "contractcustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom8", FieldKey = "contractcustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom9", FieldKey = "contractcustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom10", FieldKey = "contractcustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom11", FieldKey = "contractcustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom12", FieldKey = "contractcustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom13", FieldKey = "contractcustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom14", FieldKey = "contractcustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom15", FieldKey = "contractcustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ContractCustom16", FieldKey = "contractcustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acontract.customfields" });
|
|
}
|
|
}//eoc
|
|
}//eons |