Files
raven/server/AyaNova/DataList/PartWarehouseDataList.cs
2021-01-29 21:31:09 +00:00

97 lines
6.6 KiB
C#

using System.Collections.Generic;
using AyaNova.Biz;
namespace AyaNova.DataList
{
internal class PartWarehouseDataList : DataListProcessingBase
{
public PartWarehouseDataList()
{
DefaultListObjectType = AyaType.PartWarehouse;
SQLFrom = "from apartwarehouse";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
// //Default ListView
// dynamic dlistView = new JArray();
// dynamic cm = null;
// cm = new JObject();
// cm.fld = "PartWarehouseName";
// cm.sort = "+";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "Active";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "Tags";
// dlistView.Add(cm);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "PartWarehouseName", "Active", "Tags" };
DefaultSortBy = new Dictionary<string, string>() { { "PartWarehouseName", "+" } };
FieldDefinitions = new List<DataListFieldDefinition>();
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "PartWarehouseName",
FieldKey = "PartWarehouseName",
AyaObjectType = (int)AyaType.PartWarehouse,
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "apartwarehouse.id",
SqlValueColumnName = "apartwarehouse.name",
IsRowId = true
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "PartWarehouseNotes",
FieldKey = "PartWarehouseNotes",
UiFieldDataType = (int)UiFieldDataType.Text,
SqlValueColumnName = "apartwarehouse.notes"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Active",
FieldKey = "Active",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "apartwarehouse.active"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Tags",
FieldKey = "Tags",
UiFieldDataType = (int)UiFieldDataType.Tags,
SqlValueColumnName = "apartwarehouse.tags"
});
//-----------
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom1", FieldKey = "partwarehousecustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom2", FieldKey = "partwarehousecustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom3", FieldKey = "partwarehousecustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom4", FieldKey = "partwarehousecustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom5", FieldKey = "partwarehousecustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom6", FieldKey = "partwarehousecustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom7", FieldKey = "partwarehousecustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom8", FieldKey = "partwarehousecustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom9", FieldKey = "partwarehousecustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom10", FieldKey = "partwarehousecustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom11", FieldKey = "partwarehousecustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom12", FieldKey = "partwarehousecustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom13", FieldKey = "partwarehousecustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom14", FieldKey = "partwarehousecustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom15", FieldKey = "partwarehousecustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartWarehouseCustom16", FieldKey = "partwarehousecustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
}
}//eoc
}//eons