- Timestamp:
- 05/22/11 21:01:58 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/FilterModel.cs
r6245 r6247 16 16 public class FilterModel 17 17 { 18 18 19 19 20 20 … … 61 61 } 62 62 63 public static List<ComparisonItem> OrdinalComparisons 63 public static List<ComparisonItem> OrdinalComparisons 64 64 { 65 65 get { return ComparisonsHelper.ordinalComparisons; } … … 70 70 get { return ComparisonsHelper.stringComparisons; } 71 71 } 72 73 74 72 73 74 75 75 76 76 /// <summary> … … 192 192 if (dict != null) 193 193 { 194 194 195 195 foreach (KeyValuePair<string, string> kvp in dict) 196 196 { 197 197 if ("StringComparisonFilter".Equals(f.GetType().Name)) 198 { 198 { 199 199 if (kvp.Key.Equals(FilterModel.ValueTextbox)) 200 200 { … … 202 202 } 203 203 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) 204 { 205 ((StringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value); 206 } 204 { 205 ((StringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value); 206 } 207 207 } 208 208 else if ("NameStringComparisonFilter".Equals(f.GetType().Name)) … … 238 238 ((NameStringComparisonAvailableValuesFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value); 239 239 } 240 } 241 242 { 243 //TODO not supported244 } 245 240 } 241 else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name)) 242 { 243 //TODO not supported 244 } 245 else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name)) 246 246 { 247 247 if (kvp.Key.Equals(FilterModel.ValueDropDownList)) 248 248 { 249 ((NameEqualityComparisonBoolFilter)f).Value = Boolean.Parse( kvp.Value);249 ((NameEqualityComparisonBoolFilter)f).Value = Boolean.Parse(kvp.Value); 250 250 } 251 251 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) … … 268 268 } 269 269 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) 270 { 271 ((NameOrdinalComparisonIntFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value); 270 { 271 ((NameOrdinalComparisonIntFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value); 272 272 } 273 273 } … … 286 286 } 287 287 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) 288 { 289 ((NameOrdinalComparisonLongFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value); 290 } 291 } 292 288 { 289 ((NameOrdinalComparisonLongFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value); 290 } 291 } 293 292 else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name)) 294 293 { … … 305 304 } 306 305 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) 307 { 306 { 308 307 ((NameOrdinalComparisonFloatFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value); 309 308 } 310 309 } 310 else if ("OrdinalComparisonDateTimeFilter".Equals(f.GetType().Name)) 311 { 312 if (kvp.Key.Equals(FilterModel.ValueTextbox)) 313 { 314 try 315 { 316 ((OrdinalComparisonDateTimeFilter)f).Value = DateTime.Parse(kvp.Value); 317 } 318 catch (Exception) 319 { 320 //TOOD Fehler ausgeben 321 } 322 } 323 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) 324 { 325 ((OrdinalComparisonDateTimeFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value); 326 } 327 } 311 328 else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name)) 312 329 { … … 323 340 } 324 341 else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList)) 325 { 342 { 326 343 ((NameOrdinalComparisonDoubleFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value); 327 344 } 328 345 } 329 346 330 347 331 348 else … … 334 351 } 335 352 336 353 337 354 } 338 339 355 356 340 357 } 341 358 }
Note: See TracChangeset
for help on using the changeset viewer.