<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ProductDetails.aspx.cs" Inherits="ProductDetails" Title="Szczegóły produktu" %>
<%@ MasterType TypeName="MasterPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:FormView ID="FormView1" runat="server" DataSourceID="FormViewDataSource" EnableViewState="false">
        <ItemTemplate>
        <table width="600">
            <tr>
                <td style="width:300px">
                    <img src="ImageHandler.ashx?ImageId=<%# Eval("ImageId") %>" alt='<%# Eval("ImageName") %>' /> 
                </td>
                <td style="width:300px">
                    <div class="ContentMedium">Identyfikator: <%#Eval("ProductId") %></div><br />
                    <div class="ContentMedium">Nazwa: <%#Eval("ProductName") %></div><br />
                    <div class="ContentMedium">Opis: <%#Eval("Description") %></div><br />
                    <div class="ContentMedium">Kategoria: <%#Eval("CategoryName") %></div><br />
                    <div class="ContentMedium">Cena:<%# String.Format("{0:##.00}", Eval("SellingPrice")) %></div><br />
                    <div class="ContentMedium">Uwagi: <%#Eval("Notes") %></div><br />
                </td>
            </tr>
        </table>
        </ItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="FormViewDataSource" runat="server" 
        SelectMethod="GetProductById" TypeName="ShoppingCartTableAdapters.ProductsTableAdapter">
        <SelectParameters><asp:QueryStringParameter Name="ProductId" DefaultValue="1" QueryStringField="ProductId" /></SelectParameters>
    </asp:ObjectDataSource>
    <div style=" text-align:center"><asp:Button ID="AddToCart" runat="server" Text="Do koszyka" OnClick="AddToCart_Click" /></div>
</asp:Content>