Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/FilterModel.cs @ 6163

Last change on this file since 6163 was 6163, checked in by dhohl, 13 years ago

additional functions vor query plugin
-delte
-gui components

File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using HLWebOKBQueryPlugin.OKBQueryService;
6using HLWebOKBQueryPlugin.Helpers;
7
8namespace HLWebOKBQueryPlugin.Models
9{
10    /// <summary>
11    /// Model for Filter Data.
12    /// Current Filters (selected),
13    /// and available Filters.
14    /// </summary>
15    public class FilterModel
16    {
17        private  List<bool> boolStates;
18
19        private List<Filter> _filters;
20
21        //public KeyValuePair<int,Filter> ParentFilter { get; set; }
22        public List<Filter> Filters
23        {
24
25            get
26            {
27                QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
28                return client.GetFilters().ToList<Filter>(); /// => won't work
29            }
30       
31
32        }
33        //public Dictionary<int,Filter> SelectedFilters { get; set; }
34        // use an unique id for reach filter "Control"
35        public CombinedFilter Content { get; set; }
36
37
38        public FilterModel()
39        {
40
41        }
42
43        public FilterModel(CombinedFilter filter)
44        {
45            Content = filter;
46            //filter.i
47        }
48
49
50        public List<Boolean> GetBoolStates()
51        {
52            if (boolStates == null)
53            {
54                boolStates = new List<Boolean>();
55                boolStates.Add(true);
56                boolStates.Add(false);
57            }
58            return boolStates;
59        }
60
61    }
62}
Note: See TracBrowser for help on using the repository browser.