121 lines
4.9 KiB
C#
121 lines
4.9 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class PartRestockDataList : DataListProcessingBase
|
|
{
|
|
//NOTE: this object has NO rowid as it's a synthetic list not primarily based on any particular db table
|
|
public PartRestockDataList(long translationId)
|
|
{
|
|
|
|
DefaultListAType = AyaType.PartInventoryRestock;
|
|
SQLFrom = "FROM viewrestockrequired";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() {
|
|
"PartName", "PartWarehouseName", "PartWholesalerID","PartAlternativeWholesalerID","PartManufacturerID", "PartByWarehouseInventoryMinStockLevel",
|
|
"PartInventoryBalance", "PartByWarehouseInventoryQuantityOnOrder",
|
|
"PartByWarehouseInventoryReorderQuantity" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "PartName", "+" }, { "PartWarehouseName", "+" } };
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "PartName",
|
|
FieldKey = "PartName",
|
|
AType = (int)AyaType.Part,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "partid",
|
|
SqlValueColumnName = "partname"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "PartDescription",
|
|
FieldKey = "PartDescription",
|
|
AType = (int)AyaType.Part,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "partid",
|
|
SqlValueColumnName = "partdescription"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "PartWarehouseName",
|
|
FieldKey = "PartWarehouseName",
|
|
AType = (int)AyaType.PartWarehouse,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "partwarehouseid",
|
|
SqlValueColumnName = "displaywarehouse"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
FieldKey = "PartManufacturerID",
|
|
TKey = "PartManufacturerID",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
AType = (int)AyaType.Vendor,
|
|
SqlIdColumnName = "manufactureid",
|
|
SqlValueColumnName = "displaymanufacturer"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
FieldKey = "PartWholesalerID",
|
|
TKey = "PartWholesalerID",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
AType = (int)AyaType.Vendor,
|
|
SqlIdColumnName = "wholesalerid",
|
|
SqlValueColumnName = "displaywholesaler"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
FieldKey = "PartAlternativeWholesalerID",
|
|
TKey = "PartAlternativeWholesalerID",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
AType = (int)AyaType.Vendor,
|
|
SqlIdColumnName = "alternativewholesalerid",
|
|
SqlValueColumnName = "displayalternativewholesaler"
|
|
});
|
|
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "PartByWarehouseInventoryMinStockLevel",
|
|
FieldKey = "PartByWarehouseInventoryMinStockLevel",
|
|
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
SqlValueColumnName = "minimumquantity"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "PartInventoryBalance",
|
|
FieldKey = "PartInventoryBalance",
|
|
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
SqlValueColumnName = "balance"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "PartByWarehouseInventoryQuantityOnOrder",
|
|
FieldKey = "PartByWarehouseInventoryQuantityOnOrder",
|
|
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
SqlValueColumnName = "onorderquantity"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "PartByWarehouseInventoryReorderQuantity",
|
|
FieldKey = "PartByWarehouseInventoryReorderQuantity",
|
|
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
|
SqlValueColumnName = "requiredquantity"
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
}//eoc
|
|
}//eons |