Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/27/11 19:09:49 (13 years ago)
Author:
jwolfing
Message:

#1433 code formatted

Location:
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Views/Problem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Views/Problem/Detail.aspx

    r6304 r6317  
    44<%@ Import Namespace="HLWebOKBAdminPlugin.OKBAdministrationService" %>
    55<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    6     Detail
     6  Detail
    77</asp:Content>
    88<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="SubMenuContent">
    9    <% Html.RenderAction("Menu", "Admin"); %>
     9  <% Html.RenderAction("Menu", "Admin"); %>
    1010</asp:Content>
    1111<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    12     <% using(Html.BeginForm("SaveChanges", "Problem")) %>
    13     <% { %>
    14     <h2>
    15         Detail</h2>
    16     <%
     12  <% using (Html.BeginForm("SaveChanges", "Problem")) %>
     13  <% { %>
     14  <h2>
     15    Detail</h2>
     16  <%
    1717     
    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!
     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!
    2222
    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  <% } %>
    131130</asp:Content>
  • branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Views/Problem/Index.aspx

    r6310 r6317  
    44<%@ Import Namespace="HLWebOKBAdminPlugin.OKBAdministrationService" %>
    55<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    6     Index
     6  Index
    77</asp:Content>
    88<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="SubMenuContent">
    9    <% Html.RenderAction("Menu", "Admin"); %>
     9  <% Html.RenderAction("Menu", "Admin"); %>
    1010</asp:Content>
    1111<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    12     <h2>Problems</h2>
    13    
    14    
    15    
    16     <%  long? id = null;  %>
    17     <div class="hl-menuButtons">
     12  <h2>
     13    Problems</h2>
     14  <%  long? id = null;  %>
     15  <div class="hl-menuButtons">
    1816    <%: Html.ActionLink("New Problem", "Detail", new { id }, new { @class = "hl-button-text-plus" })%>
    19     </div>
    20 
    21         <table class="hl-dataTable">
    22         <thead>
    23         <tr>
    24         <th>Name</th>
    25         <th>Description</th>
    26         <th>Type</th>
    27         <th>Actions</th>
    28         </tr>
    29         </thead>
    30         <tbody>
    31             <!--// We get this from the Controller (Index)-->
    32             <% foreach(Problem p in ((ProblemModel)Model).Problems) {  %>
    33             <tr>
    34                 <td>
    35                     <%: p.Name%>
    36                 </td>
    37                 <td>
    38                     <%: p.Description %>
    39                 </td>
    40                 <td>
    41                     <%: p.DataTypeName %>
    42                 </td>
    43                 <td class="hl-iconcell">
    44                     <%: Html.ActionLink("detail", "Detail", new { p.Id }, new { @class = "hl-icon-edit" })%>
    45                     <%: Html.ActionLink("delete", "Delete", new { p.Id }, new { @class = "hl-icon-delete" })%>
    46                 </td>
    47             </tr>
    48             <% } %>
    49             </tbody>
    50         </table>
    51      
     17  </div>
     18  <table class="hl-dataTable">
     19    <thead>
     20      <tr>
     21        <th>
     22          Name
     23        </th>
     24        <th>
     25          Description
     26        </th>
     27        <th>
     28          Type
     29        </th>
     30        <th>
     31          Actions
     32        </th>
     33      </tr>
     34    </thead>
     35    <tbody>
     36      <!--// We get this from the Controller (Index)-->
     37      <% foreach (Problem p in ((ProblemModel)Model).Problems) {  %>
     38      <tr>
     39        <td>
     40          <%: p.Name%>
     41        </td>
     42        <td>
     43          <%: p.Description %>
     44        </td>
     45        <td>
     46          <%: p.DataTypeName %>
     47        </td>
     48        <td class="hl-iconcell">
     49          <%: Html.ActionLink("detail", "Detail", new { p.Id }, new { @class = "hl-icon-edit" })%>
     50          <%: Html.ActionLink("delete", "Delete", new { p.Id }, new { @class = "hl-icon-delete" })%>
     51        </td>
     52      </tr>
     53      <% } %>
     54    </tbody>
     55  </table>
    5256</asp:Content>
Note: See TracChangeset for help on using the changeset viewer.