Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Views/Problem/Detail.aspx @ 6162

Last change on this file since 6162 was 6162, checked in by gschwarz, 13 years ago

#1433 Updated Problem Control/View

File size: 3.2 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="Content2" ContentPlaceHolderID="MainContent" runat="server">
9    <% using(Html.BeginForm("SaveChanges", "Problem")) %>
10    <% { %>
11    <h2>
12        Detail</h2>
13    <%
14     
15        // The Model will be filled via the Controller
16        // Maybe we can use here the Problem instead
17        // of the ProblemModel. But this must be changed
18        // in the Controller too!
19
20        Problem p = ((ProblemModel)Model).Problem;
21    %>
22    <table border="1">
23        <tr>
24            <td>
25                Id:
26            </td>
27            <td>
28                <%: Html.Label(p.Id.ToString())%>
29            </td>
30            <%: Html.Hidden("ProblemId", p.Id.ToString(), p.Id.ToString())%>
31        </tr>
32        <tr>
33            <td>
34                Name:
35            </td>
36            <td>
37                <%: Html.TextBox("ProblemName", p.Name, p.Name)%>
38            </td>
39        </tr>
40        <tr>
41            <td>
42                Description:
43            </td>
44            <td>
45                <%: Html.TextBox("ProblemDescription", p.Description, p.Description)%>
46            </td>
47        </tr>
48        <tr>
49            <td>
50                DataTypeName:
51            </td>
52            <td>
53                <%: Html.TextBox("ProblemDataTypeName", p.DataTypeName, p.DataTypeName)%>
54            </td>
55        </tr>
56        <tr>
57            <td>
58                Problem Class:
59            </td>
60            <td>
61                <select name="ProblemClassId">
62                    <% foreach(ProblemClass pc in ((ProblemModel)Model).ProblemClasses) {  %>
63                        <% if(p.ProblemClassId == pc.Id) { %>
64                            <option selected="selected" value="<%=pc.Id%>"><%=pc.Name%></option>
65                        <% } else { %>
66                            <option value="<%=pc.Id%>"><%=pc.Name%></option>
67                        <% } %>
68                    <% } %>
69                </select>
70            </td>
71        </tr>
72        <tr>
73            <td>
74                Platform:
75            </td>
76            <td>
77                <select name="PlatformId">
78                    <% foreach(Platform pc in ((ProblemModel)Model).Platforms) {  %>
79                        <% if(p.PlatformId == pc.Id) { %>
80                            <option selected="selected" value="<%=pc.Id%>"><%=pc.Name%></option>
81                        <% } else { %>
82                            <option value="<%=pc.Id%>"><%=pc.Name%></option>
83                        <% } %>
84                    <% } %>
85                </select>
86            </td>
87        </tr>
88        <tr>
89            <td>
90                Action:
91            </td>
92            <td>
93                <input type="submit" value="save" />
94            </td>
95        </tr>
96    </table>   
97    <%: Html.ActionLink("back to Index","Index") %>
98    <% } %>
99</asp:Content>
Note: See TracBrowser for help on using the repository browser.