<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DataEditor.aspx.cs" Inherits="DataEditor" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>Edytor danych</title>
   <link href="chapterStyles.css" type="text/css" rel="stylesheet" />
   <style type="text/css"">
      .books { padding: 0.25em; background-color: beige; border: solid 1pt black;}
      .buttonRow { padding: 0.25em; background-color: silver; }
   </style>
</head>
<body>
   <form id="form1" runat="server">
      <div id="container">
         <h1>Edytor danych</h1>
         <h2>Wybierz książkę z listy.</h2>
         <p>
         <asp:ListBox id="lboxBooks" runat="server" 
            DataTextField="Title" DataValueField="ISBN" 
            AutoPostBack="true" 
            OnSelectedIndexChanged="SelectBooks" />
         </p>
         <asp:Panel id="panBook" runat="server" CssClass="books">
            <h2>Informacje o książce</h2>
            <p>ISBN:
            <asp:TextBox id="txtIsbn" runat="server" Columns="9" ReadOnly="true"/></p>
            <p>Tytuł:
	         <asp:TextBox id="txtTitle" runat="server" Columns="80"/></p>
            <p>Wydawca:
	         <asp:DropDownList id="drpPublisher" runat="server" 
	            DataTextField="PublisherName" DataValueField="PublisherID" /></p>					
            <p>Rok:
            <asp:TextBox id="txtYear" runat="server" Columns="3"/></p>				
            <p class="buttonRow">
            <asp:Button id="btnUpdate" runat="server" Text="Zapisz" OnClick="UpdateBook" />
            <asp:Label ID="labUpdate" runat="server" />
            </p>
         </asp:Panel>
         <p>
         <asp:Label ID="labMsg" runat="server" />
         </p>
      </div>
   </form>
</body>
</html>

