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


<!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>Edycja w kontrolce FormView za pomocą kontrolki ObjectDataSource</title>
	<link href="chapterStyles.css" type="text/css" rel="stylesheet" />
	<style type="text/css">
		.dataValues { font-weight: bold; }
		.singleBook { border-top: 1pt solid #E7E7E7;
		              border-left: 1pt solid #E7E7E7;
		              border-bottom: 1pt solid #D2D2D2;
		              border-right: 1pt solid #D2D2D2;
		              padding: 1em;	
		              margin: 1em;              
		              background: #FFFFE0;		              
		               }
		 .singleBookTitle {
                    vertical-align: middle;
                    text-align: center;
		              background: #FFFFCC;
		              }
		  .entireForm {
		            border: 2pt solid #D7D7D7; 
		  }
		  .actionBar { background: #FFFFCC; margin-top: 0.5em; padding: 0.5em; border: 1pt solid #E7E7E7;}
	</style>
</head>
<body>
	<form id="form1" runat="server">
		<div id="container">
			<h1>Edycja w kontrolce FormView za pomocą kontrolki ObjectDataSource</h1>
			<p>
			W przykładzie pokazano, jak umożliwić edycję danych w kontrolce <code>FormView</code>
			za pomocą kontrolki <code>ObjectDataSource</code>
			</p>
         <asp:DetailsView ID="frmvBooks" runat="server" DataSourceID="dsBooks" 
               CssClass="entireForm" AllowPaging="True" DataKeyNames="Isbn">

            <HeaderStyle CssClass="singleBookTitle" />


            <PagerStyle CssClass="singleBookTitle" />
            <PagerSettings Mode="NextPreviousFirstLast" 
               FirstPageImageUrl="images/page_first.gif"
               LastPageImageUrl="images/page_last.gif"
               NextPageImageUrl="images/page_next.gif"
               PreviousPageImageUrl="images/page_previous.gif"/>
         </asp:DetailsView>

         <asp:GridView ID="grdAutorBooks" runat="server" DataSourceID="dsAuthorBooks"></asp:GridView>
		</div>
	<asp:ObjectDataSource ID="dsBooks" runat="server"
		 TypeName="TwoLayer.DataAccess.BookDA" 
		 SelectMethod="GetAll" >


			 
		 
	   </asp:ObjectDataSource>
	   
      <asp:ObjectDataSource ID="dsAuthorBooks" runat="server"
          TypeName="TwoLayer.DataAccess.AuthorBooksDA"
          SelectMethod="GetAll" />                 

	</form>
</body>
</html>
