Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Query/RunCollectionTable.ascx @ 6226

Last change on this file since 6226 was 6226, checked in by msammer, 13 years ago

#1446 rebuild the shown table. Now it is possible to make a right 'details'-call via an action within the MVC

File size: 1.4 KB
Line 
1<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
2<%@ Import Namespace="HLWebOKBQueryPlugin.Helpers" %>
3<%@ Import Namespace="System.Reflection" %>
4
5<div id="RunCollectionTable" style="overflow: auto; width: 100%">
6    <table>
7        <thead>
8            <tr>
9                <th>&nbsp;</th>
10                <% foreach (PropertyInfo pi in typeof(RunCollectionData).GetProperties()) { %>
11                <th><%= pi.Name %></th>
12                <% } %>
13            </tr>
14        </thead>
15        <tbody>
16            <% IList<RunCollectionData> data = (IList<RunCollectionData>) Session["QueryRuns"];
17               foreach (RunCollectionData rcd in data) {
18                   RouteValueDictionary rvd = new RouteValueDictionary();
19                   rvd.Add("controller", "Query");
20                   rvd.Add("id", rcd.Id);
21                   %>
22                <tr>
23                    <td><%: Html.ActionLink("details", "Details", rvd) %></td>
24
25                    <% foreach (PropertyInfo pi in typeof(RunCollectionData).GetProperties()) {
26                           try { %>
27                    <td><%= pi.GetValue(rcd, null).ToString()%></td>
28                    <%     } catch (Exception e) { %>
29                        &nbsp;</td>
30                    <%     }
31                       } %>
32                </tr>
33               <% } %>
34        </tbody>
35    </table>
36
37</div>
Note: See TracBrowser for help on using the repository browser.