|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/712bd9e6/ca967f19/ |
?#pragma checksum "D:\wwwroot\bgsciences\wwwroot\product.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6797EAC944E6ACBC85274D73C941F479DBFD3019"
#line 1 "D:\wwwroot\bgsciences\wwwroot\product.aspx.cs"
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
public partial class product : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.Title = "产品展示-广州铂晋生物科技有限公司";
if (Request.QueryString["t"] != null && Request.QueryString["t"] != "" && Request.QueryString["f"] != null && Request.QueryString["f"] != "")
{
DataTable dt = SQLServerHelper.ExecuteTable("select * from TB_ProClass where id = " + Request.QueryString["t"]);
if (dt != null && dt.Rows.Count > 0)
{
this.Title = dt.Rows[0]["sname"] + "-产品展示-广州铂晋生物科技有限公司";
lt_type.Text = "> <a href=\"/product.aspx?t=" + Request.QueryString["t"] + "\"><span class=\"wz3\">" + dt.Rows[0]["sname"] + "</span></a>";
DataTable dt2 = SQLServerHelper.ExecuteTable("select * from TB_ProClass where id = " + Request.QueryString["f"]);
if (dt2 != null && dt2.Rows.Count > 0)
{
lt_type.Text = "> <a href=\"/product.aspx?t=" + Request.QueryString["t"] + "\"><span class=\"wz3\">" + dt.Rows[0]["sname"] + "</span></a> > <a href=\"/product.aspx?t=" + Request.QueryString["t"] + "&f="+Request.QueryString["f"]+"\"><span class=\"wz3\">" + dt2.Rows[0]["sname"] + "</span></a>";
}
}
}
else if (Request.QueryString["t"] != null && Request.QueryString["t"] != "")
{
DataTable dt = SQLServerHelper.ExecuteTable("select * from TB_ProClass where fid = 0 and id = " + Request.QueryString["t"]);
if (dt != null && dt.Rows.Count > 0)
{
this.Title = dt.Rows[0]["sname"] + "-产品展示-广州铂晋生物科技有限公司";
lt_type.Text = "> <a href=\"/product.aspx?t=" + Request.QueryString["t"] + "\"><span class=\"wz3\">" + dt.Rows[0]["sname"] + "</span></a>";
}
}
Bind("lg = 1 and pic <> ''");
BindCount("lg = 1 and pic <> ''");
}
}
//绑定步骤
private void Bind(string where)
{
if (Request.QueryString["t"] != null && Request.QueryString["t"] != "")
{
where += " and types = " + Request.QueryString["t"];
}
if (Request.QueryString["f"] != null && Request.QueryString["f"] != "")
{
where += " and fenlei = " + Request.QueryString["f"];
}
if (Request.QueryString["k"] != null && Request.QueryString["k"] != "")
{
where += " and title like '%" + Request.QueryString["k"] + "%' ";
}
this.piclist.DataSource = sqltool.getData_PageFromTwoTable1(this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, " id,title,pic ", "TB_Product", "" + where + "", 1, "orders", "id");
this.piclist.DataBind();
}
private void BindCount(string where)
{
if (Request.QueryString["t"] != null && Request.QueryString["t"] != "")
{
where += " and types = " + Request.QueryString["t"];
}
if (Request.QueryString["f"] != null && Request.QueryString["f"] != "")
{
where += " and fenlei = " + Request.QueryString["f"];
}
if (Request.QueryString["k"] != null && Request.QueryString["k"] != "")
{
where += " and title like '%" + Request.QueryString["k"] + "%' ";
}
int count = sqltool.SelectCountByTCW("TB_Product", "*", "" + where + "");
this.AspNetPager1.RecordCount = count;
}
//分页事务
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
Bind("lg = 1 and pic <> ''");
BindCount("lg = 1 and pic <> ''");
}
protected string sublength(string str)
{
string strresult = str;
if (strresult != "")
{
if (strresult.Length > 24)
{
strresult = strresult.Substring(0, 24);
}
}
return strresult;
}
protected string BindType()
{
StringBuilder sb = new StringBuilder();
DataTable dt = SQLServerHelper.ExecuteTable("select * from TB_ProClass where fid = 0 order by id asc");
if (dt != null && dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
DataTable dtz = SQLServerHelper.ExecuteTable("select * from TB_ProClass where fid = " + dt.Rows[i]["id"] + " order by id asc");
if (dtz != null && dtz.Rows.Count > 0)
{
sb.Append("<li><a href=\"javascript:;\" class=\"subNav currentDd currentDt\">" + dt.Rows[i]["sname"] + "</a>");
sb.Append("<ul class=\"navContent\">");
for (int s = 0; s < dtz.Rows.Count; s++)
{
sb.Append("<li><a href=\"product.aspx?t=" + dt.Rows[i]["id"] + "&f=" + dtz.Rows[s]["id"] + "\">" + dtz.Rows[s]["sname"] + "</a></li>");
}
sb.Append("</ul>");
sb.Append("</li>");
}
else
{
sb.Append("<li><a href=\"product.aspx?t=" + dt.Rows[i]["id"] + "\">" + dt.Rows[i]["sname"] + "</a></li>");
}
}
}
return sb.ToString();
}
protected string BindContactByType(int type)
{
string strcontent = string.Empty;
DataTable dt = SQLServerHelper.ExecuteTable("select contents from TB_About where lg = 1 and types = " + type + "");
if (dt.Rows.Count > 0)
{
strcontent = dt.Rows[0]["contents"].ToString();
}
return strcontent;
}
}
#line default
#line hidden