- Timestamp:
- 05/27/11 19:09:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Views/Problem/Detail.aspx
r6304 r6317 4 4 <%@ Import Namespace="HLWebOKBAdminPlugin.OKBAdministrationService" %> 5 5 <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> 6 6 Detail 7 7 </asp:Content> 8 8 <asp:Content ID="Content3" runat="server" ContentPlaceHolderID="SubMenuContent"> 9 9 <% Html.RenderAction("Menu", "Admin"); %> 10 10 </asp:Content> 11 11 <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 12 <% using(Html.BeginForm("SaveChanges", "Problem")) %>13 14 15 16 12 <% using (Html.BeginForm("SaveChanges", "Problem")) %> 13 <% { %> 14 <h2> 15 Detail</h2> 16 <% 17 17 18 19 20 21 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 22 23 Problem p = ((ProblemModel)Model).Problem; 24 %> 25 <div class="hl-menuButtons"> 26 <%: Html.ActionLink("Back to Index", "Index", null, new { @class = "hl-button-text-back" })%> 27 </div> 28 <table class="hl-table"> 29 <tr> 30 <th> 31 Id: 32 </th> 33 <td> 34 <%: Html.Label(p.Id.ToString())%> 35 </td> 36 <%: Html.Hidden("ProblemId", p.Id.ToString(), p.Id.ToString())%> 37 </tr> 38 <tr> 39 <th> 40 Name: 41 </th> 42 <td> 43 <%: Html.TextBox("ProblemName", p.Name, p.Name)%> 44 </td> 45 </tr> 46 <tr> 47 <th> 48 Description: 49 </th> 50 <td> 51 <%: Html.TextBox("ProblemDescription", p.Description, p.Description)%> 52 </td> 53 </tr> 54 <tr> 55 <th> 56 DataTypeName: 57 </th> 58 <td> 59 <%: Html.TextBox("ProblemDataTypeName", p.DataTypeName, p.DataTypeName)%> 60 </td> 61 </tr> 62 <tr> 63 <th> 64 Problem Class: 65 </th> 66 <td> 67 <select name="ProblemClassId"> 68 <% foreach(ProblemClass pc in ((ProblemModel)Model).ProblemClasses) { %> 69 <% if(p.ProblemClassId == pc.Id) { %> 70 <option selected="selected" value="<%=pc.Id%>"><%=pc.Name%></option> 71 <% } else { %> 72 <option value="<%=pc.Id%>"><%=pc.Name%></option> 73 <% } %> 74 <% } %> 75 </select> 76 </td> 77 </tr> 78 <tr> 79 <th> 80 Platform: 81 </th> 82 <td> 83 <select name="PlatformId"> 84 <% foreach(Platform pc in ((ProblemModel)Model).Platforms) { %> 85 <% if(p.PlatformId == pc.Id) { %> 86 <option selected="selected" value="<%=pc.Id%>"><%=pc.Name%></option> 87 <% } else { %> 88 <option value="<%=pc.Id%>"><%=pc.Name%></option> 89 <% } %> 90 <% } %> 91 </select> 92 </td> 93 </tr> 94 <tr> 95 <th> 96 Action: 97 </th> 98 <td> 99 <input type="submit" value="save" /> 100 </td> 101 </tr> 102 </table> 103 104 <% } %> 105 106 <% using (Html.BeginForm("UploadFile", "Problem", FormMethod.Post, new { enctype = "multipart/form-data" })) 107 {%><br /> 108 <% Problem p = ((ProblemModel)Model).Problem; %> 109 <table class="hl-table"> 110 <tr> 111 <th> 112 File: 113 </th> 114 <td> 115 <%: Html.Hidden("ProblemId", p.Id.ToString(), p.Id.ToString()) %> 116 <input type="file" name="files" id="file2" size="25" /> 117 </td> 118 </tr> 119 <tr> 120 <th> 121 Action: 122 </th> 123 <td> 124 <input type="submit" value="Upload file" /> 125 </td> 126 </tr> 127 </table> 128 <% } %> 129 130 23 Problem p = ((ProblemModel)Model).Problem; 24 %> 25 <div class="hl-menuButtons"> 26 <%: Html.ActionLink("Back to Index", "Index", null, new { @class = "hl-button-text-back" })%> 27 </div> 28 <table class="hl-table"> 29 <tr> 30 <th> 31 Id: 32 </th> 33 <td> 34 <%: Html.Label(p.Id.ToString())%> 35 </td> 36 <%: Html.Hidden("ProblemId", p.Id.ToString(), p.Id.ToString())%> 37 </tr> 38 <tr> 39 <th> 40 Name: 41 </th> 42 <td> 43 <%: Html.TextBox("ProblemName", p.Name, p.Name)%> 44 </td> 45 </tr> 46 <tr> 47 <th> 48 Description: 49 </th> 50 <td> 51 <%: Html.TextBox("ProblemDescription", p.Description, p.Description)%> 52 </td> 53 </tr> 54 <tr> 55 <th> 56 DataTypeName: 57 </th> 58 <td> 59 <%: Html.TextBox("ProblemDataTypeName", p.DataTypeName, p.DataTypeName)%> 60 </td> 61 </tr> 62 <tr> 63 <th> 64 Problem Class: 65 </th> 66 <td> 67 <select name="ProblemClassId"> 68 <% foreach (ProblemClass pc in ((ProblemModel)Model).ProblemClasses) { %> 69 <% if (p.ProblemClassId == pc.Id) { %> 70 <option selected="selected" value="<%=pc.Id%>"> 71 <%=pc.Name%></option> 72 <% } else { %> 73 <option value="<%=pc.Id%>"> 74 <%=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 ((ProblemModel)Model).Platforms) { %> 87 <% if (p.PlatformId == pc.Id) { %> 88 <option selected="selected" value="<%=pc.Id%>"> 89 <%=pc.Name%></option> 90 <% } else { %> 91 <option value="<%=pc.Id%>"> 92 <%=pc.Name%></option> 93 <% } %> 94 <% } %> 95 </select> 96 </td> 97 </tr> 98 <tr> 99 <th> 100 Action: 101 </th> 102 <td> 103 <input type="submit" value="save" /> 104 </td> 105 </tr> 106 </table> 107 <% } %> 108 <% using (Html.BeginForm("UploadFile", "Problem", FormMethod.Post, new { enctype = "multipart/form-data" })) {%><br /> 109 <% Problem p = ((ProblemModel)Model).Problem; %> 110 <table class="hl-table"> 111 <tr> 112 <th> 113 File: 114 </th> 115 <td> 116 <%: Html.Hidden("ProblemId", p.Id.ToString(), p.Id.ToString()) %> 117 <input type="file" name="files" id="file2" size="25" /> 118 </td> 119 </tr> 120 <tr> 121 <th> 122 Action: 123 </th> 124 <td> 125 <input type="submit" value="Upload file" /> 126 </td> 127 </tr> 128 </table> 129 <% } %> 131 130 </asp:Content>
Note: See TracChangeset
for help on using the changeset viewer.