|
@@ -1,4 +1,5 @@
|
|
|
using System;
|
|
|
+using System.Collections.Generic;
|
|
|
using InABox.Configuration;
|
|
|
using InABox.Core;
|
|
|
|
|
@@ -7,9 +8,13 @@ namespace PRS.Mobile.Data_Models.Filters
|
|
|
public abstract class BaseFilterModel<TEntity>
|
|
|
where TEntity :Entity, IRemotable, IPersistent
|
|
|
{
|
|
|
- public void Load()
|
|
|
+ public Dictionary<String,Filter<TEntity>> Filters { get; private set; }
|
|
|
+
|
|
|
+ public void Load(string tag)
|
|
|
{
|
|
|
- new GlobalConfiguration<DynamicGridFilters>().Load();
|
|
|
+ var filters = new GlobalConfiguration<CoreFilterDefinitions>(tag).Load();
|
|
|
+ foreach (var filter in filters)
|
|
|
+ Filters[filter.Name] = filter.AsFilter<TEntity>();
|
|
|
}
|
|
|
}
|
|
|
|