This commit is contained in:
2021-01-27 22:15:28 +00:00
parent 071339d251
commit 92cc3ebbd1
6 changed files with 149 additions and 137 deletions

View File

@@ -1,6 +1,4 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Models;
using AyaNova.Biz;
namespace AyaNova.DataList
{
@@ -16,43 +14,49 @@ namespace AyaNova.DataList
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();
// //######## 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 = "PartInventoryTransactionEntryDate";
cm.sort = "-";
dlistView.Add(cm);
// cm.fld = "PartInventoryTransactionEntryDate";
// cm.sort = "-";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartPartNumber";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartPartNumber";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartWarehouseName";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartWarehouseName";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionQuantity";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartInventoryTransactionQuantity";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionDescription";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartInventoryTransactionDescription";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionSource";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartInventoryTransactionSource";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryBalance";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartInventoryBalance";
// dlistView.Add(cm);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() {
"PartInventoryTransactionEntryDate", "PartPartNumber", "PartWarehouseName", "PartInventoryTransactionQuantity",
"PartInventoryTransactionDescription", "PartInventoryTransactionSource", "PartInventoryBalance"
};
DefaultSortBy = new Dictionary<string, string>() { { "PartInventoryTransactionEntryDate", "-" } };
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