- Timestamp:
- 05/12/11 20:08:00 (14 years ago)
- Location:
- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/FilterModel.cs
r6170 r6190 5 5 using HLWebOKBQueryPlugin.OKBQueryService; 6 6 using HLWebOKBQueryPlugin.Helpers; 7 using HLWebOKBQueryPlugin.ViewModels; 7 8 8 9 namespace HLWebOKBQueryPlugin.Models … … 15 16 public class FilterModel 16 17 { 18 19 17 20 18 21 public static string ComboboxName { get { return "filtersCombobox"; } } … … 20 23 public static string ValueTextbox { get { return "valueTextbox"; } } 21 24 public static string ValueDropDownList { get { return "valueDropDownList"; } } 22 25 public static string ComparisonDropDownList { get { return "comparisonDropDownList"; } } 23 26 24 27 /// <summary> … … 53 56 54 57 58 public static List<ComparisonItem> OrdinalComparisons 59 { 60 get { return ComparisonsHelper.ordinalComparisons; } 61 } 62 63 public static List<ComparisonItem> StringComparisons 64 { 65 get { return ComparisonsHelper.stringComparisons; } 66 } 67 68 69 //"<"; 70 //else if (Content.Comparison == OrdinalComparison.LessOrEqual) 71 // comparisonComboBox.SelectedItem = "<="; 72 //else if (Content.Comparison == OrdinalComparison.Equal) 73 // comparisonComboBox.SelectedItem = "="; 74 //else if (Content.Comparison == OrdinalComparison.GreaterOrEqual) 75 // comparisonComboBox.SelectedItem = ">="; 76 //else if (Content.Comparison == OrdinalComparison.Greater) 77 // comparisonComboBox.SelectedItem = ">"; 78 //else if (Content.Comparison == OrdinalComparison.NotEqual) 79 // comparisonComboBox.SelectedItem = "<>" 80 81 82 83 84 55 85 /// <summary> 56 86 /// Available Filters … … 61 91 { 62 92 QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester"); 63 return client.GetFilters().ToList<Filter>(); 93 Filter[] filters = client.GetFilters(); 94 95 if (filters == null) 96 { 97 return new List<Filter>(); 98 } 99 return filters.ToList<Filter>(); 64 100 } 65 101 } … … 87 123 public CombinedFilter Content { get; set; } 88 124 89 125 90 126 91 127 /// <summary> … … 171 207 if (kvp.Key.Equals(FilterModel.ValueTextbox)) 172 208 { 173 ((StringComparisonFilter)f).Value = kvp.Value; 209 ((StringComparisonFilter)f).Value = kvp.Value + "111"; 210 } 211 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) 212 { 213 ((StringComparisonFilter)f).Value = ((StringComparisonFilter)f).Value + "222"; 214 ((StringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value); 174 215 } 175 216 // To this for alle keys
Note: See TracChangeset
for help on using the changeset viewer.