Web/myshoucang.aspx.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
namespace CAI.SHOP.Web
{
public partial class myshoucang : System.Web.UI.Page
{
CAI.SHOP.BLL.product productbll = new CAI.SHOP.BLL.product();
CAI.SHOP.BLL.shoucang shoucangbll = new CAI.SHOP.BLL.shoucang();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Session["username"] == null)
{
Response.Redirect("ssnotice.aspx");
}
else
{
fenye();
if (DataList1.Items.Count == 0)
{
Label4.Visible = true;
Label4.Text = "暂时没有相关的数据";
}
}
}
}
public void fenye()
{
DataSet ds = productbll.GetList("pid in(select pid from shoucang where username='" + Session["username"] + "')");
//string mysqlba = "SELECT product.*,shoucang.* from product,shoucang WHERE (product.pid=shoucang.pid)and(username='" + Session["username"] + "')";
DataView dv =ds.Tables[0].DefaultView;
PagedDataSource pds = new PagedDataSource();
AspNetPager1.RecordCount = dv.Count;
pds.DataSource = dv;
pds.AllowPaging = true;
pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
pds.PageSize = AspNetPager1.PageSize;
this.DataList1.DataSource = pds;
this.DataList1.DataBind();
}
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
//if (e.Row.RowType == DataControlRowType.DataRow)
后面还有 93 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。