LISTS WORKING cleanup afterwords

This commit is contained in:
2021-02-08 20:10:28 +00:00
parent 4a7f9f06ca
commit 658b345378
48 changed files with 50 additions and 2586 deletions

View File

@@ -9,55 +9,16 @@ namespace AyaNova.DataList
{
public PartInventoryDataList()
{
DefaultListObjectType = AyaType.PartInventory;
SQLFrom = "from vpartinventorynow "
+ "left join apart on (vpartinventorynow.partid=apart.id) "
+ "left join apartwarehouse on (vpartinventorynow.partwarehouseid=apartwarehouse.id) ";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
// //Default ListView - show all transactions in order
// dynamic dlistView = new JArray();
// dynamic cm = null;
// cm = new JObject();
// cm.fld = "PartPartNumber";
// cm.sort = "+";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartWarehouseName";
// cm.sort = "+";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartInventoryBalance";
// dlistView.Add(cm);
// // cm = new JObject();
// // cm.fld = "PartInventoryTransactionDescription";
// // dlistView.Add(cm);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "PartPartNumber", "PartWarehouseName", "PartInventoryBalance", "PartInventoryTransactionDescription" };
DefaultSortBy = new Dictionary<string, string>() { { "PartPartNumber", "+" }, { "PartWarehouseName", "+" } };
FieldDefinitions = new List<DataListFieldDefinition>();
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionSource",
// FieldKey = "PartInventoryTransactionSource",
// UiFieldDataType = (int)UiFieldDataType.Text,
// SqlIdColumnName = "vpartinventorynow.sourceid",
// SqlValueColumnName = "AYGETNAME(vpartinventorynow.sourceid, vpartinventorynow.sourcetype)",
// SqlAyTypeColumnName = "vpartinventorynow.sourcetype"
// });
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "PartPartNumber",
@@ -90,22 +51,6 @@ namespace AyaNova.DataList
IsRowId = true
});
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionEntryDate",
// FieldKey = "PartInventoryTransactionEntryDate",
// UiFieldDataType = (int)UiFieldDataType.DateTime,
// SqlValueColumnName = "vpartinventorynow.entrydate"
// });
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionQuantity",
// FieldKey = "PartInventoryTransactionQuantity",
// UiFieldDataType = (int)UiFieldDataType.Decimal,
// SqlValueColumnName = "vpartinventorynow.quantity"
// });
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "PartInventoryBalance",
@@ -114,7 +59,6 @@ namespace AyaNova.DataList
SqlValueColumnName = "vpartinventorynow.balance"
});
//META
FieldDefinitions.Add(new DataListFieldDefinition
{