This commit is contained in:
@@ -7,8 +7,6 @@ namespace AyaNova.DataList
|
||||
public UnitDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.Unit;
|
||||
//Self join prototype
|
||||
//Be sure to alias *all* the tables to avoid issues
|
||||
SQLFrom = "from aunit as amainunit "
|
||||
+ "left join acustomer on (amainunit.customerid=acustomer.id) "
|
||||
+ "left join aunit as aparentunit on (amainunit.parentunitid=aparentunit.id) "
|
||||
@@ -17,35 +15,8 @@ namespace AyaNova.DataList
|
||||
+ "left join aunit as areplacedbyunit on (amainunit.replacedbyunitid=areplacedbyunit.id) ";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
|
||||
//######## DEFAULT VIEW ############
|
||||
// //Default ListView
|
||||
// dynamic dlistView = new JArray();
|
||||
|
||||
// dynamic cm = new JObject();
|
||||
// cm.fld = "UnitSerial";
|
||||
// cm.sort = "+";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "UnitModel";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "Customer";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "Active";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
|
||||
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
|
||||
DefaultColumns = new List<string>() { "UnitSerial", "UnitModel", "Customer", "Active" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "UnitSerial", "+" } };
|
||||
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -253,7 +224,6 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "amainunit.text4"
|
||||
});
|
||||
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "UnitCustom1", FieldKey = "unitcustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "amainunit.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "UnitCustom2", FieldKey = "unitcustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "amainunit.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "UnitCustom3", FieldKey = "unitcustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "amainunit.customfields" });
|
||||
|
||||
Reference in New Issue
Block a user