protected void Page_Load(object sender, EventArgs e) { string sqlcom = "select goodsid,images,goodsname,goodsprice from [Goods] where goodssort='书籍' order by goodsid desc "; DataFill data = new DataFill(); data.DataPage(sqlcom, MarketDetailDl, lblCurPage, lblTnum, lblEachPage, lnkFirst, lnkLast, lnkPrev, lnkNext, Request); }
public void load() { DataAccess data = new DataAccess(); data.Connection(); int id = Convert.ToInt32(Request.QueryString["id"].ToString()); string sqlcom = "select mescontent, Username, mestime from [message] where goodsid=" + id; DataFill ds = new DataFill(); ds.DataPage(sqlcom, DataList1, lblCurPage, lblTnum, lblEachPage, lnkFirst, lnkLast, lnkPrev, lnkNext, Request); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Username"] == null) { Response.Redirect("Login.aspx"); } string sqlcom = "select goodsid,images,goodsname,goodsprice,connectpeople,phone ,datetime from [Goods] where Username='******' order by goodsid desc "; DataFill data = new DataFill(); data.DataPage(sqlcom, MarketDetailDl, lblCurPage, lblTnum, lblEachPage, lnkFirst, lnkLast, lnkPrev, lnkNext, Request); userName.Text = Session["Username"].ToString(); }
public int EachPage; //每页总条数 protected void Page_Load(object sender, EventArgs e) { if (Session["Username"] == null) { Response.Redirect("Login.aspx"); } string sqlcom = "select goodsid,images,goodsname,goodsprice,connectpeople,phone ,datetime from [Goods] where Username='******' order by goodsid desc "; DataFill data = new DataFill(); data.DataPage(sqlcom, MarketDetailDl, lblCurPage, lblTnum, lblEachPage, lnkFirst, lnkLast, lnkPrev, lnkNext, Request); userName.Text = Session["Username"].ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] == null) Response.Redirect("Default.aspx"); int id = Convert.ToInt32(Request.QueryString["id"].ToString()); DataAccess data = new DataAccess(); data.Connection(); string sqlcom = "SELECT goodsname,goodsprice,phone,images,details FROM [Goods] where goodsid=" + id; SqlCommand cmd = data.excute(sqlcom); DataSet ds = data.Fill(cmd); gName.Text = ds.Tables[0].Rows[0][0].ToString(); money.Text = ds.Tables[0].Rows[0][1].ToString(); tel.Text = ds.Tables[0].Rows[0][2].ToString(); Image1.ImageUrl = ds.Tables[0].Rows[0][3].ToString(); Mes.Text = ds.Tables[0].Rows[0][4].ToString(); string sqlcom1 = "select mescontent, Username, mestime from [message] where goodsid=" + id; DataFill ds1 = new DataFill(); ds1.DataPage(sqlcom1, DataList1, lblCurPage, lblTnum, lblEachPage, lnkFirst, lnkLast, lnkPrev, lnkNext, Request); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] == null) { Response.Redirect("Default.aspx"); } int id = Convert.ToInt32(Request.QueryString["id"].ToString()); DataAccess data = new DataAccess(); data.Connection(); string sqlcom = "SELECT goodsname,goodsprice,phone,images,details FROM [Goods] where goodsid=" + id; SqlCommand cmd = data.excute(sqlcom); DataSet ds = data.Fill(cmd); gName.Text = ds.Tables[0].Rows[0][0].ToString(); money.Text = ds.Tables[0].Rows[0][1].ToString(); tel.Text = ds.Tables[0].Rows[0][2].ToString(); Image1.ImageUrl = ds.Tables[0].Rows[0][3].ToString(); Mes.Text = ds.Tables[0].Rows[0][4].ToString(); string sqlcom1 = "select mescontent, Username, mestime from [message] where goodsid=" + id; DataFill ds1 = new DataFill(); ds1.DataPage(sqlcom1, DataList1, lblCurPage, lblTnum, lblEachPage, lnkFirst, lnkLast, lnkPrev, lnkNext, Request); }
public int Tnum; //总条数; #endregion Fields #region Methods protected void Page_Load(object sender, EventArgs e) { string sqlcom = "select goodsid,images,goodsname,goodsprice from [Goods] where goodssort='生活用品' order by goodsid desc "; DataFill data = new DataFill();//创建分页填充类对象; data.DataPage(sqlcom, MarketDetailDl, lblCurPage, lblTnum, lblEachPage, lnkFirst, lnkLast, lnkPrev, lnkNext, Request);//调用分页方法; }