This commit is contained in:
96
server/AyaNova/DataList/PartWarehouseDataList.cs
Normal file
96
server/AyaNova/DataList/PartWarehouseDataList.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class PartWarehouseDataList : AyaDataList
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely
|
||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "PartWarehouseName",
|
||||
FieldKey = "PartWarehouseName",
|
||||
AyaObjectType = (int)AyaType.PartWarehouse,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "apartwarehouse.id",
|
||||
SqlValueColumnName = "apartwarehouse.name",
|
||||
IsRowId = true
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "PartWarehouseNotes",
|
||||
FieldKey = "PartWarehouseNotes",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apartwarehouse.notes"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
FieldKey = "Active",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "apartwarehouse.active"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "Tags",
|
||||
FieldKey = "Tags",
|
||||
UiFieldDataType = (int)UiFieldDataType.Tags,
|
||||
SqlValueColumnName = "apartwarehouse.tags"
|
||||
});
|
||||
|
||||
|
||||
|
||||
//-----------
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom1", FieldKey = "partwarehousecustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom2", FieldKey = "partwarehousecustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom3", FieldKey = "partwarehousecustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom4", FieldKey = "partwarehousecustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom5", FieldKey = "partwarehousecustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom6", FieldKey = "partwarehousecustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom7", FieldKey = "partwarehousecustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom8", FieldKey = "partwarehousecustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom9", FieldKey = "partwarehousecustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom10", FieldKey = "partwarehousecustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom11", FieldKey = "partwarehousecustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom12", FieldKey = "partwarehousecustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom13", FieldKey = "partwarehousecustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom14", FieldKey = "partwarehousecustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom15", FieldKey = "partwarehousecustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartWarehouseCustom16", FieldKey = "partwarehousecustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartwarehouse.customfields" });
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user