dal_Collection dc = new dal_Collection();
Label1.Text = dc.GetIndexZouMaDeng();
dal_Collection.GetIndexZouMaDeng()的代码:
public string GetIndexZouMaDeng()
{
StringBuilder res = new StringBuilder();
DataTable dt0 = GetNewsPageDB("select top 10 CN_Id, CN_Title,CN_Intro,CN_Url,CN_Uid,CN_Times from Collection order by CN_Times desc");
if (dt0.Rows.Count == 0)
{
res.Append("暂无相关数据!");
}
else
{
for (int i = 0; i
{
res.Append(" | ");
}
if (dt0.Rows.Count <= 6)
{
res.Append(res.ToString());
}
}
return res.ToString();
}