public DataTable show_num(string procedureName)
{
try
{
DataTable table = new DataTable();
con = lineserver.line();
dataadapter = new SqlDataAdapter(procedureName,con);
dataadapter.Fill(table);
lineserver.closeline();
return table;
}
catch(SqlException sqle)
{
sqle.ToString();
}
return null;
}
这是show_num方法
{
try
{
DataTable table = new DataTable();
con = lineserver.line();
dataadapter = new SqlDataAdapter(procedureName,con);
dataadapter.Fill(table);
lineserver.closeline();
return table;
}
catch(SqlException sqle)
{
sqle.ToString();
}
return null;
}
这是show_num方法
protected void Page_Load(object sender, System.EventArgs e)
{
DataTable dt=new DataTable();
dt = me.show_num("proc_show_products");
if (dt!=null && dt.Rows.Count>0)
{
for (int i = 0; i < dt.Rows.Count; i++)//热门推荐
...
}
{