<base target="main">
<% @Page Language="C#" Debug="false"%>
<% @Import Namespace="System.IO" %>
<% @ Import Namespace="System.Data" %>
<% @ Import Namespace="System.Data.SqlClient" %>

<script language="c#" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{

if (!IsPostBack)
{
// Here is the SQL connection for the ListBox
string strSQLforListBox = "SELECT img_num FROM t_infimg WHERE (pubDisclude=0) ORDER BY img_num ASC;";
string strConnection = "server=********,Port#;";
strConnection += "database=****;uid=*****;password=*****;";
SqlConnection objConnection = new SqlConnection(strConnection);
SqlCommand objCommand = new SqlCommand(strSQLforListBox, objConnection);
objConnection.Open();
lbxImageNum.DataSource = objCommand.ExecuteReader();
lbxImageNum.DataTextField = "img_num";
lbxImageNum.DataValueField = "img_num";
lbxImageNum.DataBind();
objConnection.Close();
}
}

private void subListChange(object s, System.EventArgs e)
{

// Response.Write("subListChange triggered");
// .BF string strBob = "Berlin";
// .BF Response.Write(strBob);
string strSQLforGrid = "SELECT img_num, xtnd_code, price, hght_org, wdth_org, pubCreatedYear, pubStyle, pubLocations, material, hasSQLImageOnline FROM t_infimg WHERE img_num = "+
"'"+lbxImageNum.SelectedItem.Value+"'";
// .BF "'"+strBob+"'";
string strConnection = "server=******,Port#;";
strConnection += "database=******;uid=******;password=******;";
SqlConnection objConnection = new SqlConnection(strConnection);
SqlCommand objCommand = new SqlCommand(strSQLforGrid, objConnection);
objConnection.Open();
dgEmployee.DataSource = objCommand.ExecuteReader();
dgEmployee.DataBind();
objConnection.Close();


}

</script>
<meta http-equiv="Content-Type" content="text/plain">
<table border="0" cellpadding="0" width="764" cellspacing="0" background="../images/bakgrd.jpg" style="border-collapse: collapse" bordercolor="#111111">
<tr>


<td width="94" bgcolor="#FFFFFF" background="../images/bakgrd.jpg" valign="top">

<!--"This here little code is for the listbox" -->
<form runat="server" target="_self">
<p align="right">
<asp:ListBox id="lbxImageNum"
AutoPostBack="True"
BorderColor="orange"
BorderWidth="2"
Rows="14"
OnSelectedIndexChanged = "subListChange"
runat="server" /></p>

</td>




<td width="37" bgcolor="#FFFFFF" background="../images/bakgrd.jpg" valign="top" height="4">
<br>
<font face="Georgia" size="2">&lt;---</font></td>




<td width="685" bgcolor="#FFFFFF" background="../images/bakgrd.jpg" valign="top" height="4">
<font face="Georgia" size="2"><p><br>
Select your Endico painting's tracking number
from the list box at left. Use the vertical scroll bar to
reveal more numbers. Extended information is returned from over 2000
paintings on the Endico database.<p>More than 14,000 Endico paintings
were sold before the imaging aspects of this database were developed, so
your painting may not be numbered. However, sales have been tracked since
1983. We have text records and are glad to add images to the web site. If
you have a special Endico painting for inclusion in the official record,
scanning is done by the studio at no charge, or you may submit an image for
consideration via an e-mail attachment. Ask for
details using the
<a target="_top" href="../acquire/forms/que/frame.htm">simple query form</a>.&nbsp; <p>
You will find an overview of listings at:
<a target="_top" href="../searchShortListView/frame.htm">Sample Listings</a>.</font><p></td>




<td width="33" bgcolor="#FFFFFF" background="../images/bakgrd.jpg" valign="top">
&nbsp;</td>
</tr>



<table border="0" cellpadding="0" width="764" cellspacing="0" background="../images/bakgrd.jpg" style="border-collapse: collapse" bordercolor="#111111">
<tr>

<td width="764" bgcolor="#FFFFFF" background="../images/bakgrd.jpg" valign="top">
&nbsp<br>
<asp:DataGrid id="dgEmployee" runat="server"
BorderColor="orange"
BorderWidth="2"
CellPadding="4"
AutoGenerateColumns="false"
ShowHeader="true"
Align="center">

<HeaderStyle BorderColor="White" BackColor="black"
ForeColor="White"
Font-Bold="True"
Font-Name="Arial"
Font-Size="8" HorizontalAlign="Center"/>

<Columns>

<asp:TemplateColumn HeaderText="ID">
<ItemTemplate>
<font face="arial" size="1">
<b>
<%# DataBinder.Eval(Container.DataItem, "img_num") %>
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>



<asp:TemplateColumn HeaderText="Category">
<ItemTemplate>
<font face="arial" size="1">
<b>
<%# DataBinder.Eval(Container.DataItem, "xtnd_code") %>
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>


<asp:TemplateColumn HeaderText="Price">
<ItemTemplate>
<font face="arial" size="1">
<b>
$<%# DataBinder.Eval(Container.DataItem, "price") %>.00
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>



<asp:TemplateColumn HeaderText="View">
<ItemTemplate>
<font face="arial" size="1">
<b>
<a href="get_files.aspx?PaintingNumber=<%# DataBinder.Eval(Container.DataItem, "img_num") %>" target="search">

<%# DataBinder.Eval(Container.DataItem, "hasSQLImageOnline") %></a>

</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>


<asp:TemplateColumn HeaderText="Size">
<ItemTemplate>
<font face="arial" size="1">
<b>
<%# DataBinder.Eval(Container.DataItem, "hght_org") %>x<%# DataBinder.Eval(Container.DataItem, "wdth_org") %>
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>


<asp:TemplateColumn HeaderText="Created">
<ItemTemplate>
<font face="arial" size="1">
<b>
<%# DataBinder.Eval(Container.DataItem, "pubCreatedYear") %>
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>


<asp:TemplateColumn HeaderText="Style">
<ItemTemplate>
<font face="arial" size="1">
<b>
<%# DataBinder.Eval(Container.DataItem, "pubStyle") %>
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>



<asp:TemplateColumn HeaderText="Location">
<ItemTemplate>
<font face="arial" size="1">
<b>
<%# DataBinder.Eval(Container.DataItem, "pubLocations") %>
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>


<asp:TemplateColumn HeaderText="Material">
<ItemTemplate>
<font face="arial" size="1">
<b>
<%# DataBinder.Eval(Container.DataItem, "material") %>
</b>
</font>
</ItemTemplate>
</asp:TemplateColumn>



</Columns>

</asp:DataGrid>

</td>
</tr>
</table>


<table border="0" cellpadding="0" width="764" cellspacing="0" background="../images/bakgrd.jpg" style="border-collapse: collapse" bordercolor="#111111" height="601">
<tr>
<td width="382" bgcolor="#FFFFFF" background="../images/bakgrd.jpg" valign="top" height="601">

</form> </td>

</tr>
</table>