Changeset 6305 for branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models
- Timestamp:
- 05/27/11 16:58:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/FilterModel.cs ¶
r6303 r6305 17 17 public class FilterModel 18 18 { 19 20 21 22 19 public static string ComboboxName { get { return "filtersCombobox"; } } 23 20 public static string ParentIdName { get { return "parentId"; } } … … 35 32 public FilterModel() 36 33 { 37 38 34 } 39 35 … … 51 47 { 52 48 List<Boolean> boolStates = new List<Boolean>(); 53 54 49 boolStates = new List<Boolean>(); 55 50 boolStates.Add(true); 56 51 boolStates.Add(false); 57 58 52 return boolStates; 59 53 } 60 54 } 61 62 55 63 56 public static List<ComparisonItem> BoolComparisons 64 57 { … … 75 68 get { return ComparisonsHelper.stringComparisons; } 76 69 } 77 78 79 70 80 71 81 72 /// <summary> … … 118 109 /// </summary> 119 110 public CombinedFilter Content { get; set; } 120 121 111 122 112 123 113 /// <summary> … … 154 144 internal void AddFilter(string filterTypeName, Guid parentId) 155 145 { 156 157 146 // get selected filter (combobox) 158 147 Filter filter = AvailableFilters.Where(x => x.FilterTypeName.Equals(filterTypeName)).FirstOrDefault(); 159 160 148 161 149 // find the partent filterr … … 167 155 168 156 List<Filter> filterList = parentFilter.Filters.ToList<Filter>(); 169 170 157 171 158 // Add the new filter 172 159 filterList.Add(filter); … … 181 168 } 182 169 170 183 171 /// <summary> 184 172 /// Update existing filters with posted value … … 193 181 foreach (Filter f in cf.Filters) 194 182 { 195 196 183 Dictionary<string, string> dict = postValues.Where(x => x.Key.Equals(f.Id)).FirstOrDefault().Value; 197 184 if (dict != null) 198 185 { 199 200 186 foreach (KeyValuePair<string, string> kvp in dict) 201 187 { … … 350 336 } 351 337 } 352 353 354 338 else 355 339 { 356 340 // To this for all filters 357 341 } 358 359 360 342 } 361 362 363 343 } 364 344 }
Note: See TracChangeset
for help on using the changeset viewer.