Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs	(revision 6244)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs	(revision 6245)
@@ -57,5 +57,4 @@
 
             // Add Filter
-
             String idKey = null;
             String parentIdKey = null;
@@ -77,12 +76,31 @@
             fm.AddFilter(filterTypeName, parentId);
 
-
-
-
-
+            UpdateModel(collection, fm);
+
+            // Set Content
+            Session["Content"] = fm.Content;
+
+            return View("Index", fm);
+        }
+
+        private void UpdateModel(FormCollection collection, FilterModel fm)
+        {
             // Iterate "posted" values and build up a dictionary for
             // each filter (id).
             // <id>     =>      <key> => <value>
             //          =>      <key> => <value>
+            Dictionary<Guid, Dictionary<string, string>> postValues = CreatePostValueMap(collection);
+
+            // Update filters with posted data
+            fm.UpdateWithPostValues(postValues);
+        }
+
+
+        // Iterate "posted" values and build up a dictionary for
+        // each filter (id).
+        // <id>     =>      <key> => <value>
+        //          =>      <key> => <value>
+        private Dictionary<Guid, Dictionary<string, string>> CreatePostValueMap(FormCollection collection)
+        {
             Dictionary<Guid, Dictionary<string, string>> postValues = new Dictionary<Guid, Dictionary<string, string>>();
 
@@ -111,15 +129,5 @@
                 }
             }
-
-            // Update filters with posted data
-            fm.UpdateWithPostValues(postValues);
-
-
-            // Set Content
-            Session["Content"] = fm.Content;
-
-
-
-            return View("Index", fm);
+            return postValues;
         }
 
@@ -139,4 +147,6 @@
             // Remove Filter
             bool filterRemoved = fm.RemoveFilter(id);
+
+            // TODO Model muss auch beim löschen upgeadatet werden UpdateModel(collection, fm);
 
             // Set Content
@@ -163,4 +173,5 @@
             fm.Content.Filters = orFilters.ToArray<Filter>();
 
+            // TODO Model muss auch beim löschen upgeadatet werden UpdateModel(collection, fm);
 
             Session["Content"] = fm.Content;
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/ComparisonsHelper.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/ComparisonsHelper.cs	(revision 6244)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/ComparisonsHelper.cs	(revision 6245)
@@ -22,4 +22,11 @@
         private static String STRING_COMPARISONS_NOT_LIKE = "not like";
 
+        private static String BOOL_COMPARISONS_EQUAL = "=";
+        private static String BOOL_COMPARISONS_NOT_EQUAL = "<>";
+
+        public static List<ComparisonItem> boolComparisons = new List<ComparisonItem>() 
+        { new ComparisonItem((int)OKBQueryService.EqualityComparison.Equal, BOOL_COMPARISONS_EQUAL),
+          new ComparisonItem((int)OKBQueryService.EqualityComparison.NotEqual, BOOL_COMPARISONS_NOT_EQUAL)
+        };
         public static List<ComparisonItem> ordinalComparisons = new List<ComparisonItem>() 
         { new ComparisonItem((int)OKBQueryService.OrdinalComparison.Less, ORDINAL_COMPARISONS_LESS),
@@ -40,24 +47,26 @@
 
 
-        public static String GetValueForStringComparision(OKBQueryService.StringComparison comparisionValue)
-        {
-            switch (comparisionValue)
-            {
-                case OKBQueryService.StringComparison.Equal:
-                    return STRING_COMPARISONS_EQUAL;
-                case OKBQueryService.StringComparison.Contains:
-                    return STRING_COMPARISONS_CONTAINS;
-                case OKBQueryService.StringComparison.Like:
-                    return STRING_COMPARISONS_LIKE;
-                case OKBQueryService.StringComparison.NotContains:
-                    return STRING_COMPARISONS_NOT_CONTAINS;
-                case OKBQueryService.StringComparison.NotEqual:
-                    return STRING_COMPARISONS_NOT_EQUAL;
-                case OKBQueryService.StringComparison.NotLike:
-                    return STRING_COMPARISONS_NOT_LIKE;
-                default:
-                    return STRING_COMPARISONS_EQUAL; //TODO 
-            }
-        }
+        //public static String GetValueForStringComparision(OKBQueryService.StringComparison comparisionValue)
+        //{
+        //    switch (comparisionValue)
+        //    {
+        //        case OKBQueryService.StringComparison.Equal:
+        //            return STRING_COMPARISONS_EQUAL;
+        //        case OKBQueryService.StringComparison.Contains:
+        //            return STRING_COMPARISONS_CONTAINS;
+        //        case OKBQueryService.StringComparison.Like:
+        //            return STRING_COMPARISONS_LIKE;
+        //        case OKBQueryService.StringComparison.NotContains:
+        //            return STRING_COMPARISONS_NOT_CONTAINS;
+        //        case OKBQueryService.StringComparison.NotEqual:
+        //            return STRING_COMPARISONS_NOT_EQUAL;
+        //        case OKBQueryService.StringComparison.NotLike:
+        //            return STRING_COMPARISONS_NOT_LIKE;
+        //        default:
+        //            return STRING_COMPARISONS_EQUAL; //TODO 
+        //    }
+        //}
+
+       
 
 
@@ -85,4 +94,46 @@
             }
         }
+
+        public static OKBQueryService.EqualityComparison GetEqualityComparisonForValue(string comparisonValue)
+        {
+             int v = Int32.Parse(comparisonValue);
+
+             switch (v)
+             {
+                 case (int)OKBQueryService.EqualityComparison.Equal:
+                     return OKBQueryService.EqualityComparison.Equal;
+                 case (int)OKBQueryService.EqualityComparison.NotEqual:
+                     return OKBQueryService.EqualityComparison.NotEqual;
+                 default:
+                     return OKBQueryService.EqualityComparison.Equal; //TODO 
+             }
+        }
+
+        public static OKBQueryService.OrdinalComparison GetOrdinalComparisonForValue(string comparisonValue)
+        {
+            int v = Int32.Parse(comparisonValue);
+
+         
+
+            switch (v)
+            {
+                case (int)OKBQueryService.OrdinalComparison.Equal:
+                    return OKBQueryService.OrdinalComparison.Equal;
+                case (int)OKBQueryService.OrdinalComparison.Greater:                    
+                    return OKBQueryService.OrdinalComparison.Greater;
+                case (int)OKBQueryService.OrdinalComparison.GreaterOrEqual:
+                    return OKBQueryService.OrdinalComparison.GreaterOrEqual;
+                case (int)OKBQueryService.OrdinalComparison.Less:
+                    return OKBQueryService.OrdinalComparison.Less;
+                case (int)OKBQueryService.OrdinalComparison.NotEqual:
+                    return OKBQueryService.OrdinalComparison.NotEqual;
+                case (int)OKBQueryService.OrdinalComparison.LessOrEqual:
+                    return OKBQueryService.OrdinalComparison.LessOrEqual;
+                default:                   
+                    return OKBQueryService.OrdinalComparison.Equal; //TODO 
+            }
+
+           
+        }
     }
 }
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/FilterModel.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/FilterModel.cs	(revision 6244)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/ViewModels/FilterModel.cs	(revision 6245)
@@ -56,4 +56,9 @@
 
 
+        public static List<ComparisonItem> BoolComparisons
+        {
+            get { return ComparisonsHelper.boolComparisons; }
+        }
+
         public static List<ComparisonItem> OrdinalComparisons 
         {
@@ -67,19 +72,5 @@
         
 
-        //"<";
-        //else if (Content.Comparison == OrdinalComparison.LessOrEqual)
-        //  comparisonComboBox.SelectedItem = "<=";
-        //else if (Content.Comparison == OrdinalComparison.Equal)
-        //  comparisonComboBox.SelectedItem = "=";
-        //else if (Content.Comparison == OrdinalComparison.GreaterOrEqual)
-        //  comparisonComboBox.SelectedItem = ">=";
-        //else if (Content.Comparison == OrdinalComparison.Greater)
-        //  comparisonComboBox.SelectedItem = ">";
-        //else if (Content.Comparison == OrdinalComparison.NotEqual)
-        //  comparisonComboBox.SelectedItem = "<>"
-
-
-
-
+        
 
         /// <summary>
@@ -205,26 +196,137 @@
                         {
                             if ("StringComparisonFilter".Equals(f.GetType().Name))
-                            {
-
-                                ((StringComparisonFilter)f).Value = kvp.Value;
-
-                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
-                                {
-                                    ((StringComparisonFilter)f).Value = kvp.Value; // +"111";
-
-                                    //((StringComparisonFilter)f).Value = ((StringComparisonFilter)f).Value;
-                                  //  ((StringComparisonFilter)f).Comparison = ((StringComparisonFilter)f).Comparison;
-
-
-                                }
-                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
-                                {
-                                  //  ((StringComparisonFilter)f).Value = ((StringComparisonFilter)f).Value;
-                                    ((StringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
-                                  
-                                }
-                                // To this for alle keys
-
-                            }
+                            { 
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((StringComparisonFilter)f).Value = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {                                  
+                                    ((StringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);                                  
+                                } 
+                            }
+                            else if ("NameStringComparisonFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((NameStringComparisonFilter)f).Value = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameStringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((StringComparisonAvailableValuesFilter)f).Value = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((StringComparisonAvailableValuesFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((NameStringComparisonAvailableValuesFilter)f).Value = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameStringComparisonAvailableValuesFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
+                                }
+                            }  
+                             else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name))
+                            {
+                               //TODO not supported
+                            }
+                              else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueDropDownList))
+                                {
+                                    ((NameEqualityComparisonBoolFilter)f).Value = Boolean.Parse( kvp.Value);                                  
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameEqualityComparisonBoolFilter)f).Comparison = ComparisonsHelper.GetEqualityComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonIntFilter)f).Value = Int32.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {                                    
+                                    ((NameOrdinalComparisonIntFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);                                  
+                                }
+                            }
+                            else if ("NameOrdinalComparisonLongFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonLongFilter)f).Value = Int64.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {                                   
+                                    ((NameOrdinalComparisonLongFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);                                  
+                                }                            
+                            }
+
+                            else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonFloatFilter)f).Value = float.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {                                   
+                                    ((NameOrdinalComparisonFloatFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonDoubleFilter)f).Value = Double.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {                                    
+                                    ((NameOrdinalComparisonDoubleFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);
+                                }
+                            }
+                                
+
                             else
                             {
@@ -234,6 +336,5 @@
                             
                         }
-                        StringComparisonFilter scf = (StringComparisonFilter)f;
-                        //throw new Exception("Huhu ich bin doof");
+                       
                         
                     }
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx	(revision 6244)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx	(revision 6245)
@@ -20,5 +20,5 @@
  
     <%: Html.Hidden(hiddenName,currentFilter.Id.ToString()) %>
-    <%: Html.DropDownList(comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%>
+    <%: Html.DropDownList( comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%>
     <input type="submit" value="+" />
 </p>
@@ -49,5 +49,5 @@
     <% NameStringComparisonFilter filter = ((NameStringComparisonFilter)f); %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.Label("=")%>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text",(int)filter.Comparison))%>   
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
@@ -56,5 +56,5 @@
     <% StringComparisonAvailableValuesFilter filter = ((StringComparisonAvailableValuesFilter)f); %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.Label("=")%>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text",(int)filter.Comparison))%>   
     <%: Html.DropDownList(f.Id + "." + FilterModel.ValueTextbox, new SelectList(filter.AvailableValues, filter.Value))%>
     <% }
@@ -63,12 +63,11 @@
     <% NameEqualityComparisonByteArrayFilter filter = ((NameEqualityComparisonByteArrayFilter)f); %>
     <%: Html.Label(filter.Label)%>
-      <%: Html.Label("teby")%>
+    <%: Html.Label("not supported")%>
     <% }
 else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name))
 { %>
-    <% NameEqualityComparisonBoolFilter filter = ((NameEqualityComparisonBoolFilter)f);
-    %>
+    <% NameEqualityComparisonBoolFilter filter = ((NameEqualityComparisonBoolFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.Label("is") %>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.BoolComparisons, "Value", "Text",(int)filter.Comparison))%>      
     <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(((FilterModel)Model).BoolStates, filter.Value))%>
     <% }
@@ -77,5 +76,5 @@
     <% NameOrdinalComparisonIntFilter filter = ((NameOrdinalComparisonIntFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(FilterModel.OrdinalComparisons,"Value","Text", filter.Comparison))%>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.OrdinalComparisons, "Value", "Text", (int)filter.Comparison))%>
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
@@ -84,5 +83,5 @@
     <% NameStringComparisonAvailableValuesFilter filter = ((NameStringComparisonAvailableValuesFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.Label("=")%>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text",(int)filter.Comparison))%>   
     <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(filter.AvailableValues, filter.Value))%>
     <% }
@@ -91,5 +90,5 @@
     <% NameOrdinalComparisonDoubleFilter filter = ((NameOrdinalComparisonDoubleFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.Label("<")%>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.OrdinalComparisons, "Value", "Text", (int)filter.Comparison))%>
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
@@ -98,12 +97,12 @@
     <% NameOrdinalComparisonFloatFilter filter = ((NameOrdinalComparisonFloatFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.Label("<")%>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.OrdinalComparisons, "Value", "Text", (int)filter.Comparison))%>
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
-else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
+else if ("NameOrdinalComparisonLongFilter".Equals(f.GetType().Name))
 { %>
     <% NameOrdinalComparisonLongFilter filter = ((NameOrdinalComparisonLongFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.Label("<")%>
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.OrdinalComparisons, "Value", "Text", (int)filter.Comparison))%>
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }                 
