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.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class Look_Orderlist : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string sqlstr = " select * from v3_order where oid = '"+Request.QueryString["oid"].ToString()+"'"; DataTable dt = new common().ExcuteReader(sqlstr).Tables[0]; this.lblName.Text = dt.Rows[0][3].ToString(); this.lblPhone.Text = dt.Rows[0][4].ToString(); this.lblPostcode.Text = dt.Rows[0][5].ToString(); this.lblAdd.Text = dt.Rows[0][7].ToString(); string sqlstr1 = " select * from v3_order_item as tab1 left join v3_merchandises as tab2 on tab1. pid= tab2.pid where oid = '"+Request .QueryString["oid"].ToString()+"'"; Repeater1.DataSource = new common().ExcuteReader(sqlstr1).Tables[0].DefaultView; Repeater1.DataBind(); string sqlstr2 = "select sum(a.vip_price_rmb*b.amount) as sums from v3_merchandises as a,v3_order_Item as b where a.pid=b.pid and b.oid = '"+Request .QueryString["oid"].ToString()+" 'group by a.pid"; string price; try { price = new common().ExcuteReader(sqlstr2).Tables[0].Rows[0][0].ToString(); } catch { price = "数据库中没有此商品"; } this.Label1.Text = price; this.Label2.Text = price; } }