using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Configuration;
using System.Data.SqlClient;

public partial class diamond__882_pages_ItemPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("<!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><link rel=\"stylesheet\" type=\"text/css\" href=\"../../css/urbana.css\" /><title>none</title></head>");
        Response.Write("<body><div id=\"listContent\"><table width=\"90%\" style=\"margin:10px 2px;\">");
        GenerateHTMLPage();
        Response.Write("</table></div></body></html>");
    }
    protected void GenerateHTMLPage()
    {

        string Conn = WebConfigurationManager.ConnectionStrings["2020StylesPricingConnectionString"].ConnectionString;
        string sql = "Select * FROM WallDoors WHERE  Brand='URB' AND     (ID = " + Request.QueryString["item"].ToString().Trim() + ") ";

        SqlConnection con = new SqlConnection(Conn);
        SqlCommand cmd = new SqlCommand(sql, con);

        try
        {
            con.Open();
            SqlDataReader reader = cmd.ExecuteReader();

            while (reader.Read())
            {

                Response.Write("<tr>");
                Response.Write("<td colspan=\"2\" class=\"header\">" + Server.HtmlEncode(reader["DoorStyle"].ToString().Trim()) + "</td>");
                Response.Write("</tr>");
                Response.Write("<tr>");
                Response.Write("<td colspan=\"2\" class=\"header\"><img src=\"../../images/_882/" + reader["Image"].ToString().Trim() + "\" border=\"0\" width=\"150px\" height=\"300px\" /></td>");
                Response.Write("</tr>");
                Response.Write("<tr>");
                Response.Write("<td colspan=\"2\" class=\"data\">&nbsp;</td>");//<b>Overlay</b>: " + reader["Overlay"].ToString().Trim() + "
                Response.Write("</tr>");
                Response.Write("<tr><td colspan=\"2\" class=\"data\">");
                if (reader["Notes"].ToString().Trim() != "")
                {
                    Response.Write("<b>Notes</b>: <br/><ul>");
                    string[] notes = reader["Notes"].ToString().Split('|');
                    for (int index = 0; index < notes.Length; index++)
                    {
                        Response.Write("<li>" + notes[index].ToString().Trim() + "</li>");
                    }

                    Response.Write("</ul></td>");
                }
                Response.Write("</tr>");
                Response.Write("<tr>");
                Response.Write("<td width=\"40%\"><a href=\"#\" onclick=\"parent.window.close(returnValue='RECKEY:" + reader["RECKEY"].ToString().Trim() + "');\"><img alt=\"\" src=\"../../images/Select_Urbana.jpg\" border=\"0\"  /></a></td>");
                Response.Write("<td width=\"60%\"><!---<a href=\"javascript:top.history.back();void(0);\"><img alt=\"\" src=\"../../images/Return_Urbana.jpg\" border=\"0\"  /></a> ---></td>");
                Response.Write("</tr>");
            }
            if (!reader.HasRows)
            {
                Response.Write("<tr><td>WallDoors not Found.</td></tr>");
            }
        }
        catch
        {
            throw new ApplicationException("Data Error " + sql);
        }
        finally
        {
            con.Close();
        }
    }

}
