Web/myorders.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
public partial class myorders : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["member"] == null)
{
MessageBox.ShowUrl(Page, this, "请登陆后在!在查看", "Default.aspx");
}
else
{
if (!IsPostBack)
{
dataBind();
}
}
}
public void dataBind()
{
string username = (string)Session["member"];
string sql = "select A.ordernum,A.id,A.num,A.ordertime,A.phone,A.phone,A.addr,A.realname,A.flag,B.name,B.price from orders as A left join foods as B on A.fid=B.id where A.username='" + username + "' order by A.id desc";
GridView1.DataSource = Bll.DbHelperSQL.Query(sql);
GridView1.DataKeyNames = new string[] { "id" };
GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
dataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string id = e.Row.Cells[8].Text.ToString();
string ids = e.Row.Cells[2].Text.ToString();
string idss = e.Row.Cells[3].Text.ToString();
int tid = Convert.ToInt32(id);
e.Row.Cells[8].Text = getflag(tid);
e.Row.Cells[2].Text = ids + "元";
e.Row.Cells[3].Text = idss + "份";
}
}
后面还有 28 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
