| 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Wierszowki.Models.AllViewData>" %>
|
|---|
| 2 |
|
|---|
| 3 | <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|---|
| 4 | Wierszówki
|
|---|
| 5 | </asp:Content>
|
|---|
| 6 |
|
|---|
| 7 | <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|---|
| 8 | <% if (ViewData.Model.naglowek != null){ %>
|
|---|
| 9 | <h2><%= ViewData.Model.naglowek %></h2>
|
|---|
| 10 | <% } %>
|
|---|
| 11 | <table>
|
|---|
| 12 | <tr>
|
|---|
| 13 | <th></th>
|
|---|
| 14 | <th></th>
|
|---|
| 15 | <th>Miesi¹c</th>
|
|---|
| 16 | <th>Autor</th>
|
|---|
| 17 | <th>Wydanie</th>
|
|---|
| 18 | <th>Typ</th>
|
|---|
| 19 | <th>Tytu³</th>
|
|---|
| 20 | <th>Opis</th>
|
|---|
| 21 | <th>Wycena</th>
|
|---|
| 22 | <th>Bonus</th>
|
|---|
| 23 | <th>Kto utworzy³</th>
|
|---|
| 24 | <th>Ostatnia aktualizacja</th>
|
|---|
| 25 | </tr>
|
|---|
| 26 |
|
|---|
| 27 | <% int number = 0;
|
|---|
| 28 | foreach (var item in ViewData.Model.magazine) {
|
|---|
| 29 | number += 1;
|
|---|
| 30 | %>
|
|---|
| 31 | <tr>
|
|---|
| 32 | <td>
|
|---|
| 33 | <%
|
|---|
| 34 | if (ViewData.Model.info.powrot == "1")
|
|---|
| 35 | {
|
|---|
| 36 | %>
|
|---|
| 37 | <%= Html.ActionLink("Edycja", "Edit", "MagazineItem", new { id = item.Id, powrot = "1", month = ViewData.Model.info.month, year = ViewData.Model.info.year, user_id = ViewData.Model.info.user_id }, null)%>
|
|---|
| 38 | <%
|
|---|
| 39 | }
|
|---|
| 40 | else if (ViewData.Model.info.powrot == "2")
|
|---|
| 41 | {
|
|---|
| 42 | %>
|
|---|
| 43 | <%= Html.ActionLink("Edycja", "Edit", "MagazineItem", new { id = item.Id, powrot = "2", month = ViewData.Model.info.month, year = ViewData.Model.info.year, user_id = ViewData.Model.info.user_id }, null)%>
|
|---|
| 44 | <%
|
|---|
| 45 | }
|
|---|
| 46 | %>
|
|---|
| 47 | </td>
|
|---|
| 48 | <td>
|
|---|
| 49 | <%
|
|---|
| 50 | if (ViewData.Model.info.powrot == "1")
|
|---|
| 51 | {
|
|---|
| 52 | %>
|
|---|
| 53 | <%= Html.ActionLink("Usuñ", "Delete", "MagazineItem", new { id = item.Id, powrot="1", month = ViewData.Model.info.month, year = ViewData.Model.info.year, user_id = ViewData.Model.info.user_id }, null)%>
|
|---|
| 54 | <%
|
|---|
| 55 | }
|
|---|
| 56 | else if (ViewData.Model.info.powrot == "2")
|
|---|
| 57 | {
|
|---|
| 58 | %>
|
|---|
| 59 | <%= Html.ActionLink("Usuñ", "Delete", "MagazineItem", new { id = item.Id, powrot="2", month = ViewData.Model.info.month, year = ViewData.Model.info.year, user_id = ViewData.Model.info.user_id }, null)%>
|
|---|
| 60 | <%
|
|---|
| 61 | }
|
|---|
| 62 | %>
|
|---|
| 63 | </td>
|
|---|
| 64 | <td>
|
|---|
| 65 | <%= Html.Encode(item.Date.ToString("yyyy-MM")) %>
|
|---|
| 66 | </td>
|
|---|
| 67 | <td width="85px">
|
|---|
| 68 | <%= Html.Encode(item.Author.FullName) %>
|
|---|
| 69 | </td>
|
|---|
| 70 | <td width="62px">
|
|---|
| 71 | <%= Html.Encode(item.Issue.Identifier)%>
|
|---|
| 72 | </td>
|
|---|
| 73 | <td width="48px">
|
|---|
| 74 | <%= Html.Encode(item.ItemType.Name) %>
|
|---|
| 75 | </td>
|
|---|
| 76 | <td width="150px">
|
|---|
| 77 | <%= Html.Encode(item.Caption) %>
|
|---|
| 78 | </td>
|
|---|
| 79 | <td width="140px">
|
|---|
| 80 | <%= Html.Encode(item.Description) %>
|
|---|
| 81 | </td>
|
|---|
| 82 | <td>
|
|---|
| 83 | <%= Html.Encode(String.Format("{0:F}", item.Price)) %>
|
|---|
| 84 | </td>
|
|---|
| 85 | <td>
|
|---|
| 86 | <%= Html.Encode(String.Format("{0:F}", item.Bonus)) %>
|
|---|
| 87 | </td>
|
|---|
| 88 | <td>
|
|---|
| 89 | <%= Html.Encode(item.CreatedByUser.Login) %>
|
|---|
| 90 | </td>
|
|---|
| 91 | <td width="140px">
|
|---|
| 92 | <%= Html.Encode(item.UpdatedOn) %>
|
|---|
| 93 | </td>
|
|---|
| 94 | </tr>
|
|---|
| 95 |
|
|---|
| 96 | <% } %>
|
|---|
| 97 |
|
|---|
| 98 | </table>
|
|---|
| 99 | <p>
|
|---|
| 100 | <%
|
|---|
| 101 | if (ViewData.Model.info.powrot == "1")
|
|---|
| 102 | {
|
|---|
| 103 | %>
|
|---|
| 104 | <%= Html.ActionLink("Powrót", "Index", "Home")%> |
|
|---|
| 105 | <%
|
|---|
| 106 | }
|
|---|
| 107 | else
|
|---|
| 108 | {
|
|---|
| 109 | %>
|
|---|
| 110 | <%= Html.ActionLink("Powrót", "Index", "Report")%> |
|
|---|
| 111 | <%
|
|---|
| 112 | }
|
|---|
| 113 | %>
|
|---|
| 114 | Liczba wierszówek: <%=number%>
|
|---|
| 115 | </p>
|
|---|
| 116 |
|
|---|
| 117 | </asp:Content>
|
|---|
| 118 |
|
|---|