<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Admin.Master"  
         Inherits="ViewPage<IEnumerable<SportsStore.Domain.Entities.Product>>" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> 
 Administracja : Wszystkie produkty 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 
   <h1>Wszystkie produkty</h1> 
   <table class="Grid"> 
       <tr> 
           <th>ID</th> 
           <th>Nazwa</th> 
           <th class="NumericCol">Cena</th>
           <th>Akcje</th> 
       </tr> 
       <% foreach (var item in Model) { %> 
           <tr> 
              <td><%: item.ProductID %></td> 
              <td><%: Html.ActionLink(item.Name,"Edit",new {item.ProductID})%></td> 
              <td class="NumericCol"><%: item.Price.ToString("c") %></td> 
              <td> 
                  <% using (Html.BeginForm("Delete", "Admin")) { %> 
                      <%: Html.Hidden("ProductID", item.ProductID) %> 
                      <button type="submit">Usuń</button> 
                  <% } %> 
              </td> 
           </tr> 
       <% } %> 
   </table> 
   <p><%: Html.ActionLink("Dodaj nowy produkt", "Create") %></p> 
</asp:Content>
