left.ascx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
using System.Data.SqlClient;
public partial class left : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
bind();
}
}
/// <summary>
/// 绑定数据
/// </summary>
protected void bind()
{
Repeater1.DataSource = DbHelperSQL.Query("select * from productType ");
Repeater1.DataBind();
string strSql = @"Select top 10 a.*,isnull(tt,0) as tt
from products a left join(
select pid,sum(quantity) as tt
from ordersMore
group by pid) b on a.pid=b.pid
order by tt desc";
Repeater2.DataSource = DbHelperSQL.Query(strSql);
Repeater2.DataBind();
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。