Web/Default.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wld.DBCore;
public partial class gongye_Default : System.Web.UI.Page
{
public string pictureScorll = string.Empty;
public string news = string.Empty;
public string success = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
DBHelperSql helper = new DBHelperSql();
if (!IsPostBack)
{
DataTable pictureT = helper.Select("select top 3 * from publish where pictureUrl<>'' and pictureUrl is not null and catagoryID=0 order by addTime desc");
for (int i = 0; i < pictureT.Rows.Count; i++)
{
pictureScorll += "<a href=\"Detail.aspx?id=" + pictureT.Rows[i]["id"] + "\" target=\"_blank\" hidefocus=\"true\"><li style=\"background:url(" + pictureT.Rows[i]["pictureUrl"] + ") center 0 no-repeat #ccc;)\"></li></a>";
}
DataTable newsT = helper.Select("select top 7 * from publish where catagoryID=0 order by addTime desc");
for (int i = 0; i < newsT.Rows.Count; i++)
{
news += "<li><a href=\"Detail.aspx?id=" + newsT.Rows[i]["id"] + "\" target=\"_blank\">" + (newsT.Rows[i]["articleTitle"].ToString().Length > 25 ? newsT.Rows[i]["articleTitle"].ToString().Substring(0, 25) + "..." : newsT.Rows[i]["articleTitle"].ToString()) + "</a>" + Convert.ToDateTime(newsT.Rows[i]["addTime"]).ToString("yyyy-MM-dd") + "</li>";
}
DataTable successT = helper.Select("select top 8 * from publish where catagoryID=2 order by addTime desc");
for (int i = 0; i < successT.Rows.Count; i++)
{
success += "<li><a href=\"" + successT.Rows[i]["pictureUrl"] + "\" rel=\"lightbox[ostec]\">" + " <img src =\"" + successT.Rows[i]["pictureUrl"] + "\" width=\"280\" height=\"250\" />" + "</a></li>";
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
