Service bank feature removed from front, back and e2e testing mostly commented out in case need to add back again but in some places such as db schema it had to be removed entirely so refer here if adding back in again
255 lines
13 KiB
C#
255 lines
13 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class HeadOfficeDataList : DataListProcessingBase
|
|
{
|
|
public HeadOfficeDataList()
|
|
{
|
|
DefaultListAType = AyaType.HeadOffice;
|
|
SQLFrom = "from aheadoffice left join acontract on (aheadoffice.contractid=acontract.id)";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() { "headofficename", "headofficephone1", "headofficeemail" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "headofficename", "+" } };
|
|
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficeName",
|
|
FieldKey = "headofficename",
|
|
AType = (int)AyaType.HeadOffice,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "aheadoffice.id",
|
|
SqlValueColumnName = "aheadoffice.name",
|
|
IsRowId = true
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficeNotes",
|
|
FieldKey = "headofficenotes",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.notes"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Active",
|
|
FieldKey = "headofficeactive",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "aheadoffice.active"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Tags",
|
|
FieldKey = "headofficetags",
|
|
UiFieldDataType = (int)UiFieldDataType.Tags,
|
|
SqlValueColumnName = "aheadoffice.tags"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "WebAddress",
|
|
FieldKey = "headofficewebaddress",
|
|
UiFieldDataType = (int)UiFieldDataType.HTTP,
|
|
SqlValueColumnName = "aheadoffice.webaddress"
|
|
});
|
|
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficeAccountNumber",
|
|
FieldKey = "headofficeaccountnumber",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.accountnumber"
|
|
});
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "UsesBanking",
|
|
// FieldKey = "headofficeusesbanking",
|
|
// UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
// SqlValueColumnName = "aheadoffice.usesbanking"
|
|
// });
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Contract",
|
|
FieldKey = "headofficecontract",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
AType = (int)AyaType.Contract,
|
|
SqlIdColumnName = "acontract.id",
|
|
SqlValueColumnName = "acontract.name"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ContractExpires",
|
|
FieldKey = "headofficecontractexpires",
|
|
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
|
SqlValueColumnName = "aheadoffice.contractexpires"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficePhone1",
|
|
FieldKey = "headofficephone1",
|
|
UiFieldDataType = (int)UiFieldDataType.PhoneNumber,
|
|
SqlValueColumnName = "aheadoffice.phone1"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficePhone2",
|
|
FieldKey = "headofficephone2",
|
|
UiFieldDataType = (int)UiFieldDataType.PhoneNumber,
|
|
SqlValueColumnName = "aheadoffice.phone2"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficePhone3",
|
|
FieldKey = "headofficephone3",
|
|
UiFieldDataType = (int)UiFieldDataType.PhoneNumber,
|
|
SqlValueColumnName = "aheadoffice.phone3"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficePhone4",
|
|
FieldKey = "headofficephone4",
|
|
UiFieldDataType = (int)UiFieldDataType.PhoneNumber,
|
|
SqlValueColumnName = "aheadoffice.phone4"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficePhone5",
|
|
FieldKey = "headofficephone5",
|
|
UiFieldDataType = (int)UiFieldDataType.PhoneNumber,
|
|
SqlValueColumnName = "aheadoffice.phone5"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "HeadOfficeEmail",
|
|
FieldKey = "headofficeemail",
|
|
UiFieldDataType = (int)UiFieldDataType.EmailAddress,
|
|
SqlValueColumnName = "aheadoffice.emailaddress"
|
|
});
|
|
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressPostalDeliveryAddress",
|
|
FieldKey = "headofficepostaddress",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.postaddress"
|
|
});
|
|
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressPostalCity",
|
|
FieldKey = "headofficepostcity",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.postcity"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressPostalStateProv",
|
|
FieldKey = "headofficepostregion",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.postregion"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressPostalCountry",
|
|
FieldKey = "headofficepostcountry",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.postcountry"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressPostalPostal",
|
|
FieldKey = "headofficepostcode",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.postcode"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressDeliveryAddress",
|
|
FieldKey = "headofficeaddress",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.address"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressCity",
|
|
FieldKey = "headofficecity",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.city"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressStateProv",
|
|
FieldKey = "headofficeregion",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.region"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressCountry",
|
|
FieldKey = "headofficecountry",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aheadoffice.country"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressLatitude",
|
|
FieldKey = "headofficelatitude",
|
|
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
SqlValueColumnName = "aheadoffice.latitude"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "AddressLongitude",
|
|
FieldKey = "headofficelongitude",
|
|
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
SqlValueColumnName = "aheadoffice.longitude"
|
|
});
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom1", FieldKey = "headofficecustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom2", FieldKey = "headofficecustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom3", FieldKey = "headofficecustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom4", FieldKey = "headofficecustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom5", FieldKey = "headofficecustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom6", FieldKey = "headofficecustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom7", FieldKey = "headofficecustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom8", FieldKey = "headofficecustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom9", FieldKey = "headofficecustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom10", FieldKey = "headofficecustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom11", FieldKey = "headofficecustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom12", FieldKey = "headofficecustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom13", FieldKey = "headofficecustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom14", FieldKey = "headofficecustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom15", FieldKey = "headofficecustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "HeadOfficeCustom16", FieldKey = "headofficecustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aheadoffice.customfields" });
|
|
}
|
|
|
|
}//eoc
|
|
}//eons |