- Timestamp:
- 04/29/11 10:53:02 (13 years ago)
- 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 13 13 using HLWebOKBQueryPlugin.Helpers; 14 14 15 namespace HLWebOKBQueryPlugin.Controllers 16 { 17 public class QueryController : Controller 18 { 19 public ActionResult Index() 20 { 15 namespace HLWebOKBQueryPlugin.Controllers { 16 public class QueryController : Controller { 17 public ActionResult Index() { 21 18 return View(); 22 19 } 23 20 24 public ActionResult Menu() 25 { 21 public ActionResult Menu() { 26 22 return View(); 27 23 } 28 24 29 public ActionResult Filter() 30 { 25 public ActionResult Filter() { 31 26 QueryServiceClient client = Query.GetClientFactory(); 32 27 … … 37 32 } 38 33 39 public ActionResult Results() 40 { 34 public ActionResult Results() { 35 QueryServiceClient client = Query.GetClientFactory(); 36 41 37 QueryModel qm = new QueryModel(); 42 38 Session["SelectedSubMenu"] = "Results"; 43 39 return View(qm); 44 40 } 41 42 public ActionResult RunCollectionTable() { 43 return View(); 44 } 45 45 } 46 46 } -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs
r5919 r6076 11 11 public class QueryModel { 12 12 13 public String SelectedSubMenu { get; set; }13 public String SelectedSubMenu { get; set; } 14 14 15 public IList<Filter> QueryFilterGetAll() {16 QueryServiceClient client = Query.GetClientFactory();15 public IList<Filter> QueryFilterGetAll() { 16 QueryServiceClient client = Query.GetClientFactory(); 17 17 18 IList<Filter> filterList = new List<Filter>();18 IList<Filter> filterList = new List<Filter>(); 19 19 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); 24 24 25 }26 }25 } 26 } 27 27 28 return filterList;29 }28 return filterList; 29 } 30 30 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 } 31 53 } 32 54 } -
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" %> 4 2 5 3 <asp:Content ID="Content3" runat="server" ContentPlaceHolderID="SubMenuContent"> … … 15 13 <h2>Results</h2> 16 14 17 <h3>Test table element</h3> 18 <form runat="server"> 19 <HL:RunCollectionTable ID="kurt" runat="server" /> 20 </form> 15 <% Html.RenderAction("RunCollectionTable"); %> 21 16 22 <h3>Test detail element</h3>23 <HL:RunCollectionDetail ID="sepp" runat="server" />24 17 25 18 </asp:Content> -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Query/RunCollectionDetail.ascx.cs
r5977 r6076 7 7 8 8 using System.Reflection; 9 10 using HLWebOKBQueryPlugin.Helpers; 9 11 10 12 namespace 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" %> 2 2 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"> 16 5 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.