LISTS WORKING cleanup afterwords
This commit is contained in:
@@ -12,37 +12,9 @@ namespace AyaNova.DataList
|
||||
SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) left join acustomer on (auser.customerid=acustomer.id)";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
|
||||
// //Default ListView
|
||||
// dynamic dlistView = new JArray();
|
||||
|
||||
// dynamic cm = new JObject();
|
||||
// cm.fld = "name";
|
||||
// cm.sort = "+";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "active";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "usercustomer";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "userheadoffice";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "lastlogin";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
DefaultColumns = new List<string>() { "name", "active", "usercustomer", "userheadoffice", "lastlogin" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
||||
|
||||
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
@@ -63,7 +35,6 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "auser.employeenumber"
|
||||
});
|
||||
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
@@ -119,7 +90,7 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "acustomer.name"
|
||||
});
|
||||
|
||||
//META COLUMNS
|
||||
//META COLUMNS
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
FieldKey = "metausertype",
|
||||
@@ -130,12 +101,12 @@ namespace AyaNova.DataList
|
||||
});
|
||||
}
|
||||
|
||||
public List<DataListFilterOption> DataListInternalCriteria(long currentUserId, AuthorizationRoles userRoles,string clientCriteria)
|
||||
public List<DataListFilterOption> DataListInternalCriteria(long currentUserId, AuthorizationRoles userRoles, string clientCriteria)
|
||||
{
|
||||
List<DataListFilterOption> ret = new List<DataListFilterOption>();
|
||||
|
||||
DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metausertype" };
|
||||
FilterOption.Any=true;
|
||||
FilterOption.Any = true;
|
||||
FilterOption.Items.Add(new DataListColumnFilter() { value = ((int)UserType.Customer).ToString(), op = DataListFilterComparisonOperator.Equality });
|
||||
FilterOption.Items.Add(new DataListColumnFilter() { value = ((int)UserType.HeadOffice).ToString(), op = DataListFilterComparisonOperator.Equality });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user