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
168 lines
7.5 KiB
C#
168 lines
7.5 KiB
C#
// using System.Collections.Generic;
|
|
// using AyaNova.Models;
|
|
// using AyaNova.Biz;
|
|
// using System.Linq;
|
|
// namespace AyaNova.DataList
|
|
// {
|
|
// internal class ServiceBankDataList : DataListProcessingBase, IDataListInternalCriteria
|
|
// {
|
|
// public ServiceBankDataList()
|
|
// {
|
|
|
|
// DefaultListAType = AyaType.ServiceBank;
|
|
// SQLFrom = "from aservicebank";
|
|
// var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
// AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
// DefaultColumns = new List<string>() {
|
|
// "ServiceBankCreated", "Object", "ServiceBankCurrency", "ServiceBankCurrencyBalance", "ServiceBankIncidents",
|
|
// "ServiceBankIncidentsBalance", "ServiceBankHours", "ServiceBankHoursBalance", "ServiceBankDescription"
|
|
// };
|
|
// DefaultSortBy = new Dictionary<string, string>() { { "ServiceBankCreated", "-" } };
|
|
// FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankSourceRootAType",
|
|
// FieldKey = "ServiceBankSourceRootAType",
|
|
// UiFieldDataType = (int)UiFieldDataType.Text,
|
|
// SqlIdColumnName = "aservicebank.sourceid",
|
|
// SqlValueColumnName = "AYGETNAME(aservicebank.sourceid, aservicebank.sourcetype)",
|
|
// SqlATypeColumnName = "aservicebank.sourcetype"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "Object",
|
|
// FieldKey = "Object",
|
|
// UiFieldDataType = (int)UiFieldDataType.Text,
|
|
// SqlIdColumnName = "aservicebank.objectid",
|
|
// SqlValueColumnName = "AYGETNAME(aservicebank.objectid, aservicebank.aType)",
|
|
// SqlATypeColumnName = "aservicebank.aType"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "AyaType",
|
|
// FieldKey = "AyaType",
|
|
// UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
// EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
|
// SqlValueColumnName = "aservicebank.aType"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankDescription",
|
|
// FieldKey = "ServiceBankDescription",
|
|
// AType = (int)AyaType.ServiceBank,
|
|
// UiFieldDataType = (int)UiFieldDataType.Text,
|
|
// SqlIdColumnName = "aservicebank.id",
|
|
// SqlValueColumnName = "aservicebank.name",
|
|
// IsRowId = true
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankCreated",
|
|
// FieldKey = "ServiceBankCreated",
|
|
// UiFieldDataType = (int)UiFieldDataType.DateTime,
|
|
// SqlValueColumnName = "aservicebank.entrydate"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankCurrency",
|
|
// FieldKey = "ServiceBankCurrency",
|
|
// UiFieldDataType = (int)UiFieldDataType.Currency,
|
|
// SqlValueColumnName = "aservicebank.currency"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankCurrencyBalance",
|
|
// FieldKey = "ServiceBankCurrencyBalance",
|
|
// UiFieldDataType = (int)UiFieldDataType.Currency,
|
|
// SqlValueColumnName = "aservicebank.currencybalance"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankIncidents",
|
|
// FieldKey = "ServiceBankIncidents",
|
|
// UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
// SqlValueColumnName = "aservicebank.incidents"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankIncidentsBalance",
|
|
// FieldKey = "ServiceBankIncidentsBalance",
|
|
// UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
// SqlValueColumnName = "aservicebank.incidentsbalance"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankHours",
|
|
// FieldKey = "ServiceBankHours",
|
|
// UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
// SqlValueColumnName = "aservicebank.hours"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "ServiceBankHoursBalance",
|
|
// FieldKey = "ServiceBankHoursBalance",
|
|
// UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
// SqlValueColumnName = "aservicebank.hoursbalance"
|
|
// });
|
|
|
|
// //META
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// FieldKey = "metaobjectid",
|
|
// UiFieldDataType = (int)UiFieldDataType.InternalId,
|
|
// SqlIdColumnName = "aservicebank.objectid",
|
|
// SqlValueColumnName = "aservicebank.objectid",
|
|
// IsMeta = true
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
|
|
// FieldKey = "metaobjecttype",
|
|
// UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
// EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
|
// SqlValueColumnName = "aservicebank.aType",
|
|
// IsMeta = true
|
|
// });
|
|
// }
|
|
|
|
|
|
// public List<DataListFilterOption> DataListInternalCriteria(long currentUserId, AuthorizationRoles userRoles, string clientCriteria)
|
|
// {
|
|
// List<DataListFilterOption> ret = new List<DataListFilterOption>();
|
|
|
|
// //ClientCriteria format for this list is "OBJECTID,AYATYPE"
|
|
// var crit = (clientCriteria ?? "").Split(',').Select(z => z.Trim()).ToArray();
|
|
// if (crit.Length > 1)
|
|
// {
|
|
// //OBJECTID criteria
|
|
// if (crit[0] != "0")
|
|
// {
|
|
// DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metaobjectid" };
|
|
// FilterOption.Items.Add(new DataListColumnFilter() { value = crit[0], op = DataListFilterComparisonOperator.Equality });
|
|
// ret.Add(FilterOption);
|
|
// }
|
|
|
|
// //AYATYPE criteria
|
|
// if (!string.IsNullOrWhiteSpace(crit[1]))
|
|
// {
|
|
// DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metaobjecttype" };
|
|
// FilterOption.Items.Add(new DataListColumnFilter() { value = crit[1], op = DataListFilterComparisonOperator.Equality });
|
|
// ret.Add(FilterOption);
|
|
// }
|
|
// }
|
|
// return ret;
|
|
// }
|
|
// }//eoc
|
|
// }//eons |