无法找到表 0。
News_Class代码
JWsql Exc_sql = new JWsql();
public string JWID = HttpContext.Current.Request[ "JWID "];
public string classname = " ";
protected void Page_Load(object sender, EventArgs e)
{
JW_FC.Check_num(JWID);
Exc_sql.Open();
string sql1 = "select JWClassName from JWNewsClass where JWID= " + JWID;
SqlDataReader dr1 = Exc_sql.Re_dr(sql1);
if (dr1.Read())
{
classname = "—— " + dr1[0].ToString();
}
dr1.Close();
Exc_sql.Close();
if (!IsPostBack)
{
bind();
}
}
private void bind()
{
try
{
string sql = " ";
Exc_sql.Open();
sql = "select * from JWNews where JWNewsClass in ( " + ChangHope_DB.JWParentPath(Convert.ToInt16(JWID), "JWNewsClass ") + ") and JWNewsSH=1 order by JWStat2=1,JWStat3=1,YJWID desc ";
ChangHope_DB Chp = new ChangHope_DB();
DataSet ds = Chp.Db_ds(sql, "JWNews ");
this.dg1.DataSource = datalistbind(ds);
this.dg1.DataBind();
}
catch (Exception ee)
{
Response.Write(ee.Message);