Files
raven/server/AyaNova/DataList/TaxCodeDataList.cs

94 lines
6.5 KiB
C#

using System.Collections.Generic;
using AyaNova.Biz;
namespace AyaNova.DataList
{
internal class TaxCodeDataList : DataListProcessingBase
{
public TaxCodeDataList(long translationId)
{
DefaultListAType = AyaType.TaxCode;
SQLFrom = "from ataxcode";
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
DefaultColumns = new List<string>() { "Name", "TaxCodeTaxA", "TaxCodeTaxB", "TaxCodeTaxOnTax", "Active" };
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
FieldDefinitions = new List<DataListFieldDefinition>();
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Name",
FieldKey = "Name",
AType = (int)AyaType.TaxCode,
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "ataxcode.id",
SqlValueColumnName = "ataxcode.name",
IsRowId = true
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TaxCodeNotes",
FieldKey = "TaxCodeNotes",
UiFieldDataType = (int)UiFieldDataType.Text,
SqlValueColumnName = "ataxcode.notes"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Active",
FieldKey = "Active",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "ataxcode.active"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Tags",
FieldKey = "Tags",
UiFieldDataType = (int)UiFieldDataType.Tags,
SqlValueColumnName = "ataxcode.tags"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TaxCodeTaxA",
FieldKey = "TaxCodeTaxA",
UiFieldDataType = (int)UiFieldDataType.Decimal,
SqlValueColumnName = "ataxcode.taxapct"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TaxCodeTaxB",
FieldKey = "TaxCodeTaxB",
UiFieldDataType = (int)UiFieldDataType.Decimal,
SqlValueColumnName = "ataxcode.taxbpct"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TaxCodeTaxOnTax",
FieldKey = "TaxCodeTaxOnTax",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "ataxcode.taxontax"
});
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom1", FieldKey = "TaxCodecustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom2", FieldKey = "TaxCodecustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom3", FieldKey = "TaxCodecustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom4", FieldKey = "TaxCodecustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom5", FieldKey = "TaxCodecustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom6", FieldKey = "TaxCodecustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom7", FieldKey = "TaxCodecustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom8", FieldKey = "TaxCodecustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom9", FieldKey = "TaxCodecustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom10", FieldKey = "TaxCodecustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom11", FieldKey = "TaxCodecustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom12", FieldKey = "TaxCodecustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom13", FieldKey = "TaxCodecustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom14", FieldKey = "TaxCodecustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom15", FieldKey = "TaxCodecustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom16", FieldKey = "TaxCodecustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
}
}//eoc
}//eons