Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Views/Algorithm/Detail.aspx @ 6304

Last change on this file since 6304 was 6304, checked in by dkahn, 13 years ago

#1198 Ongoing styling

File size: 4.3 KB
Line 
1<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
2
3<%@ Import Namespace="HLWebOKBAdminPlugin.Models" %>
4<%@ Import Namespace="HLWebOKBAdminPlugin.OKBAdministrationService" %>
5<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
6    Detail
7</asp:Content>
8<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="SubMenuContent">
9   <% Html.RenderAction("Menu", "Admin"); %>
10</asp:Content>
11<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
12    <% using(Html.BeginForm("SaveChanges", "Algorithm")) %>
13    <% { %>
14    <h2>
15        Detail</h2>
16    <%
17     
18        // The Model will be filled via the Controller
19        // Maybe we can use here the Problem instead
20        // of the ProblemModel. But this must be changed
21        // in the Controller too!
22
23        Algorithm p = ((AlgorithmModel)Model).Algorithm;
24    %>
25
26            <div class="hl-menuButtons">                 
27        <%: Html.ActionLink("Back to Index", "Index", null, new { @class = "hl-button-text-back" })%>
28        </div>
29
30    <table class="hl-table">
31        <tr>
32            <th>
33                Id:
34            </th>
35            <td>
36                <%: Html.Label(p.Id.ToString())%>
37            </td>
38            <%: Html.Hidden("AlgorithmId", p.Id.ToString(), p.Id.ToString())%>
39        </tr>
40        <tr>
41            <th>
42                Name:
43            </th>
44            <td>
45                <%: Html.TextBox("AlgorithmName", p.Name, p.Name)%>
46            </td>
47        </tr>
48        <tr>
49            <th>
50                Description:
51            </th>
52            <td>
53                <%: Html.TextBox("AlgorithmDescription", p.Description, p.Description)%>
54            </td>
55        </tr>
56        <tr>
57            <th>
58                DataTypeName:
59            </th>
60            <td>
61                <%: Html.TextBox("AlgorithmDataTypeName", p.DataTypeName, p.DataTypeName)%>
62            </td>
63        </tr>
64        <tr>
65            <th>
66                Algorith Class:
67            </th>
68            <td>
69                <select name="AlgorithmClassId">
70                    <% foreach(AlgorithmClass pc in ((AlgorithmModel)Model).AlgorithmClasses) {  %>
71                        <% if(p.AlgorithmClassId == pc.Id) { %>
72                            <option selected="selected" value="<%=pc.Id%>"><%=pc.Name%></option>
73                        <% } else { %>
74                            <option value="<%=pc.Id%>"><%=pc.Name%></option>
75                        <% } %>
76                    <% } %>
77                </select>
78            </td>
79        </tr>
80        <tr>
81            <th>
82                Platform:
83            </th>
84            <td>
85                <select name="PlatformId">
86                    <% foreach(Platform pc in ((AlgorithmModel)Model).Platforms) {  %>
87                        <% if(p.PlatformId == pc.Id) { %>
88                            <option selected="selected" value="<%=pc.Id%>"><%=pc.Name%></option>
89                        <% } else { %>
90                            <option value="<%=pc.Id%>"><%=pc.Name%></option>
91                        <% } %>
92                    <% } %>
93                </select>
94            </td>
95        </tr>
96        <tr>
97            <th>
98                Action:
99            </th>
100            <td>
101                <input type="submit" value="save" />
102            </td>
103        </tr>
104    </table>   
105   
106    <% } %>
107
108    <% using (Html.BeginForm("UploadFile", "Algorithm", FormMethod.Post, new { enctype = "multipart/form-data" }))
109    {%><br />
110        <% Algorithm p = ((AlgorithmModel)Model).Algorithm; %>       
111        <table class="hl-table">
112            <tr>
113                <th>
114                    File:
115                </th>
116                <td>
117                    <%: Html.Hidden("AlgorithmId", p.Id.ToString(), p.Id.ToString())%>
118                    <input type="file" name="files" id="file2" size="25" />
119                </td>
120            </tr>
121            <tr>
122                <th>
123                    Action:
124                </th>
125                <td>
126                    <input type="submit" value="Upload file" />
127                </td>
128            </tr>
129        </table>
130
131        <% } %>
132       
133
134</asp:Content>
Note: See TracBrowser for help on using the repository browser.