[6130] | 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">
|
---|
[6317] | 6 | Detail
|
---|
[6130] | 7 | </asp:Content>
|
---|
[6290] | 8 | <asp:Content ID="Content3" runat="server" ContentPlaceHolderID="SubMenuContent">
|
---|
[6317] | 9 | <% Html.RenderAction("Menu", "Admin"); %>
|
---|
[6290] | 10 | </asp:Content>
|
---|
[6130] | 11 | <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
---|
[6317] | 12 | <% using (Html.BeginForm("SaveChanges", "Problem")) %>
|
---|
| 13 | <% { %>
|
---|
| 14 | <h2>
|
---|
| 15 | Detail</h2>
|
---|
| 16 | <%
|
---|
[6130] | 17 |
|
---|
[6317] | 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!
|
---|
[6130] | 22 |
|
---|
[6317] | 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 | <% } %>
|
---|
[6130] | 130 | </asp:Content>
|
---|