Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5919


Ignore:
Timestamp:
04/01/11 01:47:33 (13 years ago)
Author:
cfleisch
Message:

#1439 Example implementation of method GetFilters() in view Filter added

Location:
branches/WebApplication/MVC2/HLWebOKBQueryPlugin
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/QueryController.cs

    r5910 r5919  
    1111using HLWebPluginHost.Models;
    1212using HLWebOKBQueryPlugin.OKBQueryService;
     13using HLWebOKBQueryPlugin.Helpers;
    1314
    1415namespace HLWebOKBQueryPlugin.Controllers
     
    2829        public ActionResult Filter()
    2930        {
     31            QueryServiceClient client = Query.GetClientFactory();
     32
     33
    3034            QueryModel qm = new QueryModel();
    3135            Session["SelectedSubMenu"] = "Filter";
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/HLWebOKBQueryPlugin.csproj

    r5910 r5919  
    9494    </Compile>
    9595    <Compile Include="Helpers\HtmlHelpers.cs" />
     96    <Compile Include="Helpers\Query.cs" />
    9697    <Compile Include="Models\AccountModels.cs" />
    9798    <Compile Include="Models\QueryModel.cs" />
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs

    r5910 r5919  
    66using System.Web.Security;
    77using HLWebOKBQueryPlugin.OKBQueryService;
     8using HLWebOKBQueryPlugin.Helpers;
    89
    910namespace HLWebPluginHost.Models {
     
    1213       public String SelectedSubMenu { get; set; }
    1314
     15       public IList<Filter> QueryFilterGetAll() {
     16           QueryServiceClient client = Query.GetClientFactory();
     17
     18           IList<Filter> filterList = new List<Filter>();
     19
     20           if (client != null) {
     21               Filter[] filters = client.GetFilters();
     22               foreach (Filter f in filters) {
     23                   filterList.Add(f);
     24
     25               }
     26           }
     27
     28           return filterList;
     29       }
     30
    1431    }
    1532}
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Query/Filter.aspx

    r5910 r5919  
    1111<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    1212
     13    <form id="form1" runat="server">
    1314    <h2>Filter</h2>
    1415
     16    <p>
     17        <asp:ListBox ID="lbxQueryFilters" runat="server" DataSourceID="dsQueryFilters"
     18            DataTextField="Label" DataValueField="Label" Height="350px" style="margin-top: 0px"
     19            Width="400px">
     20        </asp:ListBox>
     21        <asp:ObjectDataSource ID="dsQueryFilters" runat="server"
     22            SelectMethod="QueryFilterGetAll"
     23            TypeName="HLWebPluginHost.Models.QueryModel">
     24        </asp:ObjectDataSource>
     25       
     26
     27    </p>
     28    </form>
     29
    1530</asp:Content>
Note: See TracChangeset for help on using the changeset viewer.