110 lines
7.3 KiB
C#
110 lines
7.3 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class TravelRateDataList : DataListProcessingBase
|
|
{
|
|
public TravelRateDataList()
|
|
{
|
|
DefaultListAType = AyaType.TravelRate;
|
|
SQLFrom = "from atravelrate";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() { "Name", "Cost", "RateCharge", "RateUnitChargeDescriptionID", "Active" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Name",
|
|
FieldKey = "Name",
|
|
AType = (int)AyaType.TravelRate,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "atravelrate.id",
|
|
SqlValueColumnName = "atravelrate.name",
|
|
IsRowId = true
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "TravelRateNotes",
|
|
FieldKey = "TravelRateNotes",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "atravelrate.notes"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Active",
|
|
FieldKey = "Active",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "atravelrate.active"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Tags",
|
|
FieldKey = "Tags",
|
|
UiFieldDataType = (int)UiFieldDataType.Tags,
|
|
SqlValueColumnName = "atravelrate.tags"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "RateAccountNumber",
|
|
FieldKey = "RateAccountNumber",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "atravelrate.accountnumber"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Cost",
|
|
FieldKey = "Cost",
|
|
UiFieldDataType = (int)UiFieldDataType.Currency,
|
|
SqlValueColumnName = "atravelrate.cost"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "RateCharge",
|
|
FieldKey = "RateCharge",
|
|
UiFieldDataType = (int)UiFieldDataType.Currency,
|
|
SqlValueColumnName = "atravelrate.charge"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "RateUnitChargeDescriptionID",
|
|
FieldKey = "RateUnitChargeDescriptionID",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "atravelrate.unit"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "RateContractRate",
|
|
FieldKey = "ContractOnly",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "atravelrate.contractonly"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom1", FieldKey = "TravelRatecustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom2", FieldKey = "TravelRatecustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom3", FieldKey = "TravelRatecustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom4", FieldKey = "TravelRatecustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom5", FieldKey = "TravelRatecustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom6", FieldKey = "TravelRatecustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom7", FieldKey = "TravelRatecustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom8", FieldKey = "TravelRatecustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom9", FieldKey = "TravelRatecustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom10", FieldKey = "TravelRatecustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom11", FieldKey = "TravelRatecustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom12", FieldKey = "TravelRatecustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom13", FieldKey = "TravelRatecustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom14", FieldKey = "TravelRatecustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom15", FieldKey = "TravelRatecustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TravelRateCustom16", FieldKey = "TravelRatecustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "atravelrate.customfields" });
|
|
}
|
|
}//eoc
|
|
}//eons |