LISTS WORKING cleanup afterwords
This commit is contained in:
@@ -7,48 +7,14 @@ namespace AyaNova.DataList
|
||||
public PartDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.Part;
|
||||
|
||||
SQLFrom = "from apart "
|
||||
+ "left join avendor as aman on (apart.manufacturerid=aman.id) "
|
||||
+ "left join avendor as awhole on (apart.wholesalerid=awhole.id) "
|
||||
+ "left join avendor as aaltwhole on (apart.alternativewholesalerid=aaltwhole.id)";
|
||||
|
||||
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 = "PartPartNumber";
|
||||
// cm.sort = "+";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "PartName";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "PartManufacturerID";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "PartWholesalerID";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "Tags";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
DefaultColumns = new List<string>() { "PartPartNumber", "PartName", "PartManufacturerID", "PartWholesalerID", "Tags" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "PartPartNumber", "+" } };
|
||||
|
||||
|
||||
//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<DataListFieldDefinition>();
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -70,7 +36,6 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "apart.name"
|
||||
});
|
||||
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PartNotes",
|
||||
@@ -111,7 +76,6 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "apart.retail"
|
||||
});
|
||||
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
FieldKey = "PartManufacturerID",
|
||||
@@ -182,10 +146,6 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "apart.upc"
|
||||
});
|
||||
|
||||
|
||||
|
||||
//-----------
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom1", FieldKey = "partcustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom2", FieldKey = "partcustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom3", FieldKey = "partcustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
|
||||
Reference in New Issue
Block a user