root/branches/Abonament/Wierszowki/Wierszowki.Web/Views/Report/All.aspx @ 854

Wersja 854, 4.1 KB (wprowadzona przez marek, 17 years temu)

re #184 - merged with latest trunk

RevLine 
[854]1<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Wierszowki.Models.AllViewData>" %>
[752]2
3<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
[854]4        Wierszówki
[752]5</asp:Content>
6
7<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
[854]8    <%  if (ViewData.Model.naglowek != null){  %>
9            <h2><%= ViewData.Model.naglowek %></h2>
10    <%  } %>       
[752]11    <table>
12        <tr>
13            <th></th>
[839]14            <th></th>
[752]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   
[854]27    <% int number = 0;
28        foreach (var item in ViewData.Model.magazine) {
29            number += 1;         
30    %>   
[752]31        <tr>
32            <td>
[854]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                    %>
[752]47            </td>
48            <td>
[854]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                %>               
[839]63            </td>
64            <td>
[752]65                <%= Html.Encode(item.Date.ToString("yyyy-MM")) %>
66            </td>
[854]67            <td width="85px">
[752]68                <%= Html.Encode(item.Author.FullName) %>
69            </td>
[854]70            <td width="62px">
[752]71                <%= Html.Encode(item.Issue.Identifier)%>
72            </td>
[854]73            <td width="48px">
[752]74                <%= Html.Encode(item.ItemType.Name) %>
75            </td>
[854]76            <td width="150px">
[752]77                <%= Html.Encode(item.Caption) %>
78            </td>
[854]79            <td width="140px">
[752]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>
[854]91            <td width="140px">
[752]92                <%= Html.Encode(item.UpdatedOn) %>
93            </td>
94        </tr>
95   
96    <% } %>
97
98    </table>
99    <p>
[854]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%>
[752]115    </p>
116
117</asp:Content>
118
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.