- Timestamp:
- 05/09/11 22:13:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx
r6163 r6170 3 3 <%@ Import Namespace="HLWebOKBQueryPlugin.OKBQueryService" %> 4 4 <!-- Put all into a form that calls the "AddFilter" Action--> 5 <div><table> 6 <tr><td>A<br />N<br />D</td><td> 5 7 <p> 6 8 <% … … 11 13 <% 12 14 13 string comboboxName = "filtersCombobox." + currentFilter.Id;14 string hiddenName = "parentId." + currentFilter.Id;15 string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id; 16 string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id; 15 17 %> 16 18 17 Select Filter:18 19 <%: Html.Hidden(hiddenName,currentFilter.Id.ToString()) %> 19 <%: Html.DropDownList(comboboxName, new SelectList(((FilterModel)Model). Filters, "FilterTypeName", "Label"))%>20 <%: Html.DropDownList(comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%> 20 21 <input type="submit" value="+" /> 21 22 </p> … … 30 31 if (f != null) 31 32 { %> 32 <div> 33 34 <table border="0"><tr><td> 33 35 <% 34 36 … … 37 39 { %> 38 40 <% StringComparisonFilter filter = ((StringComparisonFilter)f); %> 39 40 41 <%: Html.Label(filter.Label)%> 41 <%: Html.Label("=") %> 42 <%: Html.TextBox(f.Id + ".valueTextbox", (filter.Value))%> 43 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 42 <%: Html.Label("=")%> 43 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, (filter.Value))%> 44 44 <% } 45 45 else if ("NameStringComparisonFilter".Equals(f.GetType().Name)) … … 47 47 <% NameStringComparisonFilter filter = ((NameStringComparisonFilter)f); %> 48 48 <%: Html.Label(filter.Label)%> 49 <%: Html.Label("= xxx" + f.Id)%> 50 <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id, filter.Value )%> 51 <%: Html.ActionLink("-", "DeleteFilter", new { f.Id })%> 49 <%: Html.Label("=" + f.Id)%> 50 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 52 51 <% } 53 52 else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name)) … … 55 54 <% StringComparisonAvailableValuesFilter filter = ((StringComparisonAvailableValuesFilter)f); %> 56 55 <%: Html.Label(filter.Label)%> 57 <%: Html.Label("=")%> 58 <%: Html.DropDownList(f.Id + ".valueDropDownList", new SelectList(filter.AvailableValues,filter.Value))%> 59 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 60 <% } 56 <%: Html.Label("=")%> 57 <%: Html.DropDownList(f.Id + "." + FilterModel.ValueTextbox, new SelectList(filter.AvailableValues, filter.Value))%> 58 <% } 61 59 else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name)) 62 60 { %> 63 61 <% NameEqualityComparisonByteArrayFilter filter = ((NameEqualityComparisonByteArrayFilter)f); %> 64 <%: Html.Label(filter.Label)%> 65 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 66 <% } 62 <%: Html.Label(filter.Label)%> 63 <% } 67 64 else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name)) 68 65 { %> … … 70 67 %> 71 68 <%: Html.Label(filter.Label)%> 72 <%: Html.Label("is")%> 73 <%: Html.DropDownList(f.Id + ".valueDropDownList", new SelectList(((FilterModel)Model).GetBoolStates(),filter.Value)) %> 74 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 75 <% } 69 <%: Html.Label("is")%> 70 <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(((FilterModel)Model).BoolStates, filter.Value))%> 71 <% } 76 72 else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name)) 77 73 { %> 78 74 <% NameOrdinalComparisonIntFilter filter = ((NameOrdinalComparisonIntFilter)f); %> 79 75 <%: Html.Label(filter.Label)%> 80 <%: Html.Label("is")%> 81 82 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 83 <% } 76 <%: Html.Label("is")%> 77 <% } 84 78 else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name)) 85 79 { %> 86 80 <% NameStringComparisonAvailableValuesFilter filter = ((NameStringComparisonAvailableValuesFilter)f); %> 87 81 <%: Html.Label(filter.Label)%> 88 <%: Html.Label("=")%> 89 <%: Html.DropDownList(f.Id + ".valueDropDownList", new SelectList(filter.AvailableValues,filter.Value))%> 90 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 91 <% } 82 <%: Html.Label("=")%> 83 <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(filter.AvailableValues, filter.Value))%> 84 <% } 92 85 else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name)) 93 86 { %> 94 87 <% NameOrdinalComparisonDoubleFilter filter = ((NameOrdinalComparisonDoubleFilter)f); %> 95 88 <%: Html.Label(filter.Label)%> 96 <%: Html.Label("=")%> 97 <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id, filter.Value )%> 98 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 99 <% } 89 <%: Html.Label("=")%> 90 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 91 <% } 100 92 else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name)) 101 93 { %> 102 94 <% NameOrdinalComparisonFloatFilter filter = ((NameOrdinalComparisonFloatFilter)f); %> 103 95 <%: Html.Label(filter.Label)%> 104 <%: Html.Label("=")%> 105 <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id, filter.Value )%> 106 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 107 <% } 108 else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name)) 96 <%: Html.Label("=")%> 97 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 98 <% } 99 else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name)) 109 100 { %> 110 101 <% NameOrdinalComparisonLongFilter filter = ((NameOrdinalComparisonLongFilter)f); %> 111 102 <%: Html.Label(filter.Label)%> 112 <%: Html.Label("=")%> 113 <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id, filter.Value )%> 114 <%: Html.ActionLink("-","DeleteFilter", f.Id )%> 115 <% } 103 <%: Html.Label("=")%> 104 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 105 <% } 116 106 117 118 119 120 121 122 123 124 125 else126 { %>127 <!-- other types ... must be implemented -->128 <%: Html.Label(f.GetType().Name)%>129 <% }130 107 %> 131 </div> 108 <%: Html.ActionLink("remove", "DeleteFilter", new { f.Id })%> 109 110 <% }%> 111 </td></tr></table> 112 <% } %> 113 <% }%> 132 114 <% } 133 } 134 }%> 135 <% } 136 137 %> 115 116 %> </td></tr> 117 </table></div>
Note: See TracChangeset
for help on using the changeset viewer.