MasterPage.master.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["MemberName"] != null)
{
//会员没有退出登陆
divLogin.Visible = false;
divShow.Visible = true;
}
if (!IsPostBack)
{
string SqlType = "select top 10 * from tb_GoodsType order by TypeID desc";
DataSet ds = DBHelper.GetDataSet(SqlType);
this.GridView2.DataSource = ds.Tables[0];
this.GridView2.DataBind();
string SQLGongGao = "select top 10 * from tb_News order by NewsDate desc";
DataSet dsGongGao = DBHelper.GetDataSet(SQLGongGao);
this.GridView1.DataSource = dsGongGao.Tables[0];
this.GridView1.DataBind();
string sql2 = "SELECT TOP (10) GoodsID, GoodsName, GoodsPicture,sales FROM tb_Goods ORDER BY sales DESC";
DataSet result2 = DBHelper.GetDataSet(sql2);
this.DataList1.DataSource = result2.Tables[0];
this.DataList1.DataBind();
string SQLNew = "SELECT TOP (10) GoodsID, GoodsName, GoodsPicture,sales FROM tb_Goods ORDER BY AddDate DESC";
DataSet result3 = DBHelper.GetDataSet(SQLNew);
this.DataList2.DataSource = result3.Tables[0];
this.DataList2.DataBind();
}
}
protected void btLogin_Click(object sender, EventArgs e)
{
string membername, pwd;
membername = this.txtMemberName.Text.Trim();
pwd = this.txtPWD.Text;
string sql1 = "select * from tb_Member where MemberName ='" + membername + "' and MemberPwd ='" + pwd + "'";
DataSet ds1 = DBHelper.GetDataSet(sql1);
后面还有 58 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。