<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="SalesDisplay.Sales" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 

<html>
  <head>
    <title>WebForm1</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
  </head>
  <body MS_POSITIONING="GridLayout">

	
    <form id="SalesReport" method="post" runat="server" title="Sales Report">
<asp:Label ID="lblMsg" Runat="server">
The data found here is screen scraped from Amazon and stored in a local database.
The data is updated every 15 minutes. This is a work in progress.
</asp:Label><br>
Last Updated: <asp:Label id="lblLastUpdate" Runat="server" text="<%# lastUpdate %>" />
&nbsp; Show 
<asp:TextBox 
	id=txtShowRecords
	Runat="server" 
	AutoPostBack="True"
	Width="20" 
	text="<%# showRecords %>" /> 
Records 

<br><br>

<b>ASP Titles</b>
<asp:DataGrid 
id="dgASPSalesRank" 
CellPadding="5"
OnItemDataBound="Item_Bound"
AutoGenerateColumns="False"
 HeaderStyle-BackColor="PapayaWhip"
 BorderColor="#000099"
 AlternatingItemStyle-BackColor="LightGrey"
 HeaderStyle-Font-Bold=true
 Width="900"
runat="server">
	<columns>
		<asp:templatecolumn HeaderStyle-Width ="10">
			<headertemplate>
				Position
			</headertemplate>
			<itemtemplate>
				<asp:label text="<%# rowNumber %>" runat="server" ID="Label1"/>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:templatecolumn>
			<headertemplate>
				Title
			</headertemplate>
			<itemtemplate>
				<a href="http://www.amazon.com/exec/obidos/ASIN/
					<%# DataBinder.Eval(Container.DataItem, "isbn") %>/" 
					target="_blank"><%# 
					DataBinder.Eval(Container.DataItem, "title") %></a>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:BoundColumn HeaderText="Author" 
			ReadOnly="true" 
			DataField="author"/>
		<asp:BoundColumn HeaderText="Publisher" 
			ReadOnly="true" 
			DataField="publisher"/>
		<asp:BoundColumn HeaderText="Publish Date"
			ReadOnly="true" 
			DataField="pubdate"/>
		<asp:BoundColumn HeaderText="Rank" 
			ReadOnly="true" 
			DataField="Rank" DataFormatString="{0:N0}"
			ItemStyle-HorizontalAlign="Right"/>
	</columns>
	</asp:DataGrid>
<br>
<br><hr><br>
<b>C# Titles</b>
<asp:DataGrid 
id="dgCSharpSalesRank" 
CellPadding="5"
OnItemDataBound="Item_Bound"
AutoGenerateColumns="False"
 HeaderStyle-BackColor="PapayaWhip"
 BorderColor="#000099"
 AlternatingItemStyle-BackColor="LightGrey"
 HeaderStyle-Font-Bold=true
 Width="900"
runat="server">
	<columns>
		<asp:templatecolumn HeaderStyle-Width ="10">
			<headertemplate>
				Position
			</headertemplate>
			<itemtemplate>
				<asp:label text="<%# rowNumber %>" runat="server" ID="Label2"/>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:templatecolumn>
			<headertemplate>
				Title
			</headertemplate>
			<itemtemplate>
				<a href="http://www.amazon.com/exec/obidos/ASIN/<%# DataBinder.Eval(Container.DataItem, "isbn") %>/" target="_blank"><%# DataBinder.Eval(Container.DataItem, "title") %></a>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:BoundColumn HeaderText="Author" 
			ReadOnly="true" 
			DataField="author"/>		
		<asp:BoundColumn HeaderText="Publisher" 
			ReadOnly="true" 
			DataField="publisher"/>
		<asp:BoundColumn HeaderText="Publish Date"
			ReadOnly="true" 
			DataField="pubdate"/>
		<asp:BoundColumn HeaderText="Rank" 
			ReadOnly="true" 
			DataField="Rank" DataFormatString="{0:N0}" ItemStyle-HorizontalAlign="Right"/>
	</columns>
	</asp:DataGrid>
<br>
<br><hr><br>
<b>VB.NET Titles</b>
<asp:DataGrid 
id="dgVBNETSalesRank" 
CellPadding="5"
OnItemDataBound="Item_Bound"
AutoGenerateColumns="False"
 HeaderStyle-BackColor="PapayaWhip"
 BorderColor="#000099"
 AlternatingItemStyle-BackColor="LightGrey"
 HeaderStyle-Font-Bold=true
 Width="900"
runat="server">
	<columns>
		<asp:templatecolumn HeaderStyle-Width ="10">
			<headertemplate>
				Position
			</headertemplate>
			<itemtemplate>
				<asp:label text="<%# rowNumber %>" runat="server" ID="Label3"/>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:templatecolumn>
			<headertemplate>
				Title
			</headertemplate>
			<itemtemplate>
				<a href="http://www.amazon.com/exec/obidos/ASIN/<%# DataBinder.Eval(Container.DataItem, "isbn") %>/" target="_blank"><%# DataBinder.Eval(Container.DataItem, "title") %></a>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:BoundColumn HeaderText="Author" 
			ReadOnly="true" 
			DataField="author"/>		
		<asp:BoundColumn HeaderText="Publisher" 
			ReadOnly="true" 
			DataField="publisher"/>
		<asp:BoundColumn HeaderText="Publish Date"
			ReadOnly="true" 
			DataField="pubdate"/>
		<asp:BoundColumn HeaderText="Rank" 
			ReadOnly="true" 
			DataField="Rank" DataFormatString="{0:N0}" ItemStyle-HorizontalAlign="Right"/>
	</columns>
	</asp:DataGrid>
<br>
<br>
<br><hr><br>
<b>All Titles</b>
<asp:DataGrid 
id="dgAll" 
CellPadding="5"
OnItemDataBound="Item_Bound"
AutoGenerateColumns="False"
 HeaderStyle-BackColor="PapayaWhip"
 BorderColor="#000099"
 AlternatingItemStyle-BackColor="LightGrey"
 HeaderStyle-Font-Bold=true
 Width="900"
runat="server">
	<columns>
		<asp:templatecolumn HeaderStyle-Width ="10">
			<headertemplate>
				Position
			</headertemplate>
			<itemtemplate>
				<asp:label text="<%# rowNumber %>" runat="server" ID="Label4"/>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:templatecolumn>
			<headertemplate>
				Title
			</headertemplate>
			<itemtemplate>
				<a href="http://www.amazon.com/exec/obidos/ASIN/<%# DataBinder.Eval(Container.DataItem, "isbn") %>/" target="_blank"><%# DataBinder.Eval(Container.DataItem, "title") %></a>
			</itemtemplate>
		</asp:templatecolumn>
		<asp:BoundColumn HeaderText="Author" 
			ReadOnly="true" 
			DataField="author"/>		
		<asp:BoundColumn HeaderText="Publisher" 
			ReadOnly="true" 
			DataField="publisher"/>
		<asp:BoundColumn HeaderText="Publish Date"
			ReadOnly="true" 
			DataField="pubdate"/>
		<asp:BoundColumn HeaderText="Rank" 
			ReadOnly="true" 
			DataField="Rank" DataFormatString="{0:N0}" ItemStyle-HorizontalAlign="Right"/>
	</columns>
	</asp:DataGrid>
<br>
&nbsp;
<br>
    </form>
    </body>
</html>
