This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -12,56 +11,46 @@ namespace AyaNova.DataList
|
|||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
//Default ListView
|
// //Default ListView
|
||||||
dynamic dlistView = new JArray();
|
// dynamic dlistView = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
// dynamic cm = new JObject();
|
||||||
cm.fld = "widgetname";
|
// cm.fld = "widgetname";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "widgetserial";
|
// cm.fld = "widgetserial";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "widgetdollaramount";
|
// cm.fld = "widgetdollaramount";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "widgetusertype";
|
// cm.fld = "widgetusertype";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "widgetstartdate";
|
// cm.fld = "widgetstartdate";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "widgetactive";
|
// cm.fld = "widgetactive";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "username";
|
// cm.fld = "username";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||||
|
|
||||||
DefaultColumns=""
|
// DefaultColumns=""
|
||||||
|
|
||||||
|
DefaultColumns = new List<string>() { "widgetname", "widgetserial", "widgetdollaramount", "widgetusertype", "widgetstartdate", "widgetactive", "username" };
|
||||||
|
DefaultSortBy = new Dictionary<string, string>() { { "widgetname", "+" } };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// DefaultDataListView = @"
|
|
||||||
// {
|
|
||||||
// [{key:""COLUMN UNIQUE KEY ID",sort:"-" or "+",filter:{any:true/false,items:[{FILTER OBJECT SEE BELOW}]} }, {key:"second column unique key"},{...etc...}]
|
|
||||||
|
|
||||||
// ""full"":[""widgetname"",""widgetserial"",""widgetdollaramount"",""widgetusertype"",""widgetstartdate"",""widgetactive"",""username""],
|
|
||||||
|
|
||||||
// }
|
|
||||||
// ";
|
|
||||||
|
|
||||||
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined (in this case User) table need to be specified completely
|
|
||||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||||
//DEPRECATED: FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.Widget, SqlIdColumnName = "awidget.id", IsFilterable = false, IsSortable = false, });
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "WidgetName",
|
TKey = "WidgetName",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -13,23 +12,26 @@ namespace AyaNova.DataList
|
|||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
//Default ListView
|
// //Default ListView
|
||||||
dynamic dlistView = new JArray();
|
// dynamic dlistView = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
// dynamic cm = new JObject();
|
||||||
cm.fld = "name";
|
// cm.fld = "name";
|
||||||
cm.sort = "+";
|
// cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "stock";
|
// cm.fld = "stock";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "cjkindex";
|
// cm.fld = "cjkindex";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||||
|
|
||||||
|
DefaultColumns = new List<string>() { "name", "stock", "cjkindex" };
|
||||||
|
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -12,35 +11,37 @@ namespace AyaNova.DataList
|
|||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
//######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
||||||
//Default ListView
|
// //Default ListView
|
||||||
dynamic dlistView = new JArray();
|
// dynamic dlistView = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
// dynamic cm = new JObject();
|
||||||
cm.fld = "Name";
|
// cm.fld = "Name";
|
||||||
cm.sort = "+";
|
// cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "Cost";
|
// cm.fld = "Cost";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "RateCharge";
|
// cm.fld = "RateCharge";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "RateUnitChargeDescriptionID";
|
// cm.fld = "RateUnitChargeDescriptionID";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "Active";
|
// cm.fld = "Active";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// 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
|
DefaultColumns = new List<string>() { "Name", "Cost", "RateCharge", "RateUnitChargeDescriptionID", "Active" };
|
||||||
|
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
||||||
|
|
||||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -19,32 +18,34 @@ namespace AyaNova.DataList
|
|||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
//######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
||||||
//Default ListView
|
// //Default ListView
|
||||||
dynamic dlistView = new JArray();
|
// dynamic dlistView = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
// dynamic cm = new JObject();
|
||||||
cm.fld = "UnitSerial";
|
// cm.fld = "UnitSerial";
|
||||||
cm.sort = "+";
|
// cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "UnitModel";
|
// cm.fld = "UnitModel";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "Customer";
|
// cm.fld = "Customer";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "Active";
|
// cm.fld = "Active";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// 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
|
DefaultColumns = new List<string>() { "UnitSerial", "UnitModel", "Customer", "Active" };
|
||||||
|
DefaultSortBy = new Dictionary<string, string>() { { "UnitSerial", "+" } };
|
||||||
|
|
||||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -12,33 +11,34 @@ namespace AyaNova.DataList
|
|||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
//######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
||||||
//Default ListView
|
// //Default ListView
|
||||||
dynamic dlistView = new JArray();
|
// dynamic dlistView = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
// dynamic cm = new JObject();
|
||||||
cm.fld = "UnitModelModelNumber";
|
// cm.fld = "UnitModelModelNumber";
|
||||||
cm.sort = "+";
|
// cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "Name";
|
// cm.fld = "Name";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "UnitModelVendorID";
|
// cm.fld = "UnitModelVendorID";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "Active";
|
// cm.fld = "Active";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||||
|
|
||||||
|
DefaultColumns = new List<string>() { "UnitModelModelNumber", "Name", "UnitModelVendorID", "Active" };
|
||||||
|
DefaultSortBy = new Dictionary<string, string>() { { "UnitModelModelNumber", "+" } };
|
||||||
|
|
||||||
|
|
||||||
//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 = new List<AyaDataListFieldDefinition>();
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "UnitModelModelNumber",
|
TKey = "UnitModelModelNumber",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -12,33 +11,33 @@ namespace AyaNova.DataList
|
|||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
//######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
|
||||||
//Default ListView
|
// //Default ListView
|
||||||
dynamic dlistView = new JArray();
|
// dynamic dlistView = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
// dynamic cm = new JObject();
|
||||||
cm.fld = "vendorname";
|
// cm.fld = "vendorname";
|
||||||
cm.sort = "+";
|
// cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "vendorphone1";
|
// cm.fld = "vendorphone1";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "vendoremail";
|
// cm.fld = "vendoremail";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "vendortags";
|
// cm.fld = "vendortags";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||||
|
|
||||||
|
DefaultColumns = new List<string>() { "vendorname", "vendorphone1", "vendoremail", "vendortags" };
|
||||||
|
DefaultSortBy = new Dictionary<string, string>() { { "vendorname", "+" } };
|
||||||
|
|
||||||
//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 = new List<AyaDataListFieldDefinition>();
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "VendorName",
|
TKey = "VendorName",
|
||||||
@@ -81,7 +80,7 @@ namespace AyaNova.DataList
|
|||||||
UiFieldDataType = (int)UiFieldDataType.HTTP,
|
UiFieldDataType = (int)UiFieldDataType.HTTP,
|
||||||
SqlValueColumnName = "avendor.webaddress"
|
SqlValueColumnName = "avendor.webaddress"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
@@ -91,7 +90,7 @@ namespace AyaNova.DataList
|
|||||||
SqlValueColumnName = "avendor.accountnumber"
|
SqlValueColumnName = "avendor.accountnumber"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user