This commit is contained in:
81
server/AyaNova/DataList/ContractDataList.cs
Normal file
81
server/AyaNova/DataList/ContractDataList.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class ContractDataList : DataListProcessingBase
|
||||
{
|
||||
public ContractDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.Contract;
|
||||
SQLFrom = "from acontract";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
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",
|
||||
AyaObjectType = (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
|
||||
Reference in New Issue
Block a user