File: D:/HostingSpaces/SBogers34/himawarijewels.com/wwwroot/Product.aspx.cs
using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Connectopen;
using Jaychan.Common;
public partial class Proudct : System.Web.UI.Page
{
public string nmt = "", title = "", acw = "", ac_top = "",pr_l="",pr_r="";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Bid == -1) Bid = 103;
PageDataBind();
}
}
public void PageDataBind()
{
int i = 1;
Nav_P1.Text = WebUtils.GetCookie("Ncce_Language") + Bid.ToString();
//try
// {
GetContent drt = new GetContent();
OleDbDataReader drf = drt.GetnewsTitle("2", Bid);
while (drf.Read())
{
if (i == 1) Cid = int.Parse(drf[1].ToString());
nmt += "nmt" + i.ToString() + "=" + drf[0] + "&";
nmtu.Text += "case " + i.ToString() + ":\nlocation.href='Product.aspx?Bid=" + Bid + "&Cid=" + drf[1] + "';break\n";
i++;
}
drf.Close();
drf = drt.GetClassTitle("1", Bid);
while (drf.Read())
{
navtitle.Text = "<a href='Product.aspx?Bid=" + Bid + "'>" + drf[0] + "</a>";
title = drf[0].ToString();
}
drf.Close();
drf = drt.GetClassTitle("2", Cid);
while (drf.Read())
{
navtitle.Text += " > <span>" + drf[0] + "</span>";
title = drf[0].ToString() + " - " + title + " - ";
}
drf.Close();
i = 1;
drf = drt.GetProducts(Bid,Cid,0,0,999);
while (drf.Read())
{
if (i == 1) pr_r = "<IMG height=350 src=uploadfile/" + drf[4] + " jqimg=uploadfile/" + drf[4] + " width=400><div id=jaychan_ptext>" + drf[1] + " " + drf[2] + "</div>";
//if (i == 1) pr_r = "\"uploadfile/" + drf[4] + "\",\"" + drf[1] + " " + drf[2] + "\"";
//"/Shop/UploadFiles/2009/20090401040939165673.jpg","产品完整大图"
// pr_l += "<div class='flsd'><img src=\"uploadfile/" + drf[3] + "\" jqimg=\"uploadfile/" + drf[4] + "\" alt=\"" + drf[1] +" "+ drf[2] + "\" height=80 class=hand onclick='Cs(\"uploadfile/" + drf[4] + "\",\"" + drf[1] + " " + drf[2] + "\")'></div>\n";
pr_l += "<div class='flsd'><img src=\"uploadfile/" + drf[3] + "\" jqimg=\"uploadfile/" + drf[4] + "\" alt=\"" + drf[1] +" "+ drf[2] + "\" height=80 class=hand></div>\n";
if (i%3==0){pr_l +="<div class=cb></div>";}
if (i%9==0){pr_l +="</td><td valign=top>";}
i++;
}
drf.Close();
Page.Title = title + Page.Title;
// }
// catch (Exception ex)
// {
// System.Web.HttpContext.Current.Response.Write("<script>location.reload();</script>");
//}
}
public int Bid
{
get
{
if (WebUtils.GetInt("Bid", -1) == -1)
{
if (ViewState["Bid"] == null)
{
ViewState["Bid"] = -1;
}
}
else
{
ViewState["Bid"] = WebUtils.GetInt("Bid", -1);
}
return DataConverter.StrToInt(ViewState["Bid"], -1);
}
set
{
ViewState["Bid"] = value;
}
}
public int Cid
{
get
{
if (WebUtils.GetInt("Cid", -1) == -1)
{
if (ViewState["Cid"] == null)
{
ViewState["Cid"] = -1;
}
}
else
{
ViewState["Cid"] = WebUtils.GetInt("Cid", -1);
}
return DataConverter.StrToInt(ViewState["Cid"], -1);
}
set
{
ViewState["Cid"] = value;
}
}
}