Default.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class _Default : System.Web.UI.Page
{
SqlHelper data = new SqlHelper();
public string fenleiName = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Get_Info();
}
}
private void Get_Info()
{
string sql = "select a.*,d.fenleiName,case when b.shuliang is null then 0 else b.shuliang end as shuliang, c.xingming from dbo.Topic a left join(select TopicID,count(*) as shuliang from TopicRey group by TopicID) as b on a.ID=b.TopicID left join yonghu c on a.AddUser=c.yonghuhao left join fenlei d on a.fenleiID=d.id ";
DataSet ds2 = new DataSet();
ds2 = data.GetDs(sql, "ds");
Repeater1.DataSource = ds2.Tables[0];
Repeater1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Session["yonghuhao"] == null)
{
Alert.AlertAndRedirect("发帖请先登陆!", "Default.aspx");
return;
}
Response.Redirect("AddTopic1.aspx");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。