Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/29/11 10:53:02 (14 years ago)
Author:
msammer
Message:

#1446 Changed RunCollectionTable for using it in the MVC-pluginhost. Changes for using real Run-objects in the table

Location:
branches/WebApplication/MVC2/HLWebOKBQueryPlugin
Files:
3 added
3 deleted
5 edited

Legend:

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

    r5919 r6076  
    1313using HLWebOKBQueryPlugin.Helpers;
    1414
    15 namespace HLWebOKBQueryPlugin.Controllers
    16 {
    17     public class QueryController : Controller
    18     {
    19         public ActionResult Index()
    20         {
     15namespace HLWebOKBQueryPlugin.Controllers {
     16    public class QueryController : Controller {
     17        public ActionResult Index() {
    2118            return View();
    2219        }
    2320
    24         public ActionResult Menu()
    25         {
     21        public ActionResult Menu() {
    2622            return View();
    2723        }
    2824
    29         public ActionResult Filter()
    30         {
     25        public ActionResult Filter() {
    3126            QueryServiceClient client = Query.GetClientFactory();
    3227
     
    3732        }
    3833
    39         public ActionResult Results()
    40         {
     34        public ActionResult Results() {
     35            QueryServiceClient client = Query.GetClientFactory();
     36
    4137            QueryModel qm = new QueryModel();
    4238            Session["SelectedSubMenu"] = "Results";
    4339            return View(qm);
    4440        }
     41
     42        public ActionResult RunCollectionTable() {
     43            return View();
     44        }
    4545    }
    4646}
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs

    r5919 r6076  
    1111    public class QueryModel {
    1212
    13        public String SelectedSubMenu { get; set; }
     13        public String SelectedSubMenu { get; set; }
    1414
    15        public IList<Filter> QueryFilterGetAll() {
    16            QueryServiceClient client = Query.GetClientFactory();
     15        public IList<Filter> QueryFilterGetAll() {
     16            QueryServiceClient client = Query.GetClientFactory();
    1717
    18            IList<Filter> filterList = new List<Filter>();
     18            IList<Filter> filterList = new List<Filter>();
    1919
    20            if (client != null) {
    21                Filter[] filters = client.GetFilters();
    22                foreach (Filter f in filters) {
    23                    filterList.Add(f);
     20            if (client != null) {
     21                Filter[] filters = client.GetFilters();
     22                foreach (Filter f in filters) {
     23                    filterList.Add(f);
    2424
    25                }
    26            }
     25                }
     26            }
    2727
    28            return filterList;
    29        }
     28            return filterList;
     29        }
    3030
     31        // just 4 testing
     32        public IList<RunCollectionData> getTestRuns() {
     33
     34            QueryServiceClient client = Query.GetClientFactory();
     35
     36            if (client != null) {
     37                IList<RunCollectionData> runs = new List<RunCollectionData>();
     38
     39                //long[] runIds = client.GetRunIds(new Filter());
     40                //if (runIds.Length < cnt) cnt = runIds.Length;
     41
     42                long[] getRuns = new long[2]{1,2};
     43
     44                IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>();
     45
     46                foreach (Run r in runList)
     47                    runs.Add(new RunCollectionData(r));
     48
     49                return runs;
     50            }
     51            return new List<RunCollectionData>();
     52        }
    3153    }
    3254}
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Query/Results.aspx

    r5977 r6076  
    1 <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
    2 <%@ Register Src="~/Views/Query/RunCollectionTable.ascx" TagName="RunCollectionTable" TagPrefix="HL" %>
    3 <%@ Register Src="~/Views/Query/RunCollectionDetail.ascx" TagName="RunCollectionDetail" TagPrefix="HL" %>
     1<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" ViewStateMode="Enabled" EnableEventValidation="true"  %>
    42
    53<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="SubMenuContent">
     
    1513    <h2>Results</h2>
    1614   
    17     <h3>Test table element</h3>
    18     <form runat="server">
    19         <HL:RunCollectionTable ID="kurt" runat="server" />
    20     </form>
     15        <% Html.RenderAction("RunCollectionTable"); %>
    2116
    22     <h3>Test detail element</h3>
    23     <HL:RunCollectionDetail ID="sepp" runat="server" />
    2417
    2518</asp:Content>
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Query/RunCollectionDetail.ascx.cs

    r5977 r6076  
    77
    88using System.Reflection;
     9
     10using HLWebOKBQueryPlugin.Helpers;
    911
    1012namespace HLWebOKBQueryPlugin.Views.Query {
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Query/RunCollectionTable.ascx

    r5977 r6076  
    1 <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RunCollectionTable.ascx.cs" Inherits="HLWebOKBQueryPlugin.Views.Query.RunCollectionTable" %>
     1<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
    22
    3 <asp:GridView ID="GridRunCollection" runat="server" AutoGenerateColumns="False"
    4                 OnRowCommand="GridRunCollection_RowCommand"
    5                 OnSelectedIndexChanged="GridRunCollection_SelectedIndexChanged">
    6     <SelectedRowStyle BackColor="Aqua" />
    7     <Columns>
    8         <asp:BoundField />
    9         <asp:CommandField ShowSelectButton="true" SelectText="Details" />
    10         <asp:BoundField HeaderText="Abs.DifferenceBestKnown2Best" />
    11         <asp:BoundField HeaderText="Algorithm Name" DataField="AlgorithmName" />
    12         <asp:BoundField HeaderText="Algorithm Type" DataField="AlgorithmAlgorithmClass" />
    13         <asp:BoundField HeaderText="Analyser" />
    14     </Columns>
    15 </asp:GridView>
     3<div id="RunCollectionTable" style="overflow: auto; width: 100%">
     4    <form id="frmRunCollectionTable" runat="server" method="post">
    165
    17 <asp:TextBox ID="txtTest" runat="server" />
    18 <asp:TextBox ID="txtTest2" runat="server" />
     6        <asp:GridView ID="GridRunCollection" runat="server" DataSourceID="dsQueryRuns">
     7            <SelectedRowStyle BackColor="Aqua" />
     8            <Columns>
     9                <asp:BoundField />
     10                <asp:CommandField ShowSelectButton="true" SelectText="Details" />
     11            </Columns>
     12        </asp:GridView>
     13        <asp:ObjectDataSource ID="dsQueryRuns" runat="server"
     14                    SelectMethod="getTestRuns"
     15                    TypeName="HLWebPluginHost.Models.QueryModel">
     16        </asp:ObjectDataSource>
     17
     18    </form>
     19</div>
Note: See TracChangeset for help on using the changeset viewer.