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 SysAdmin_ChangeOrderState : 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 = new common().ExcuteReader(sqlstr2).Tables[0].Rows[0][0].ToString(); this.Label1.Text = price; this.Label2.Text = price; } protected void Button1_Click(object sender, EventArgs e) { string sqlstr = "update v3_order_item set isend = 1 where oid ='" + Request.QueryString["oid"].ToString() +"'"; bool b = new common().ExcuteNoneQuery(sqlstr, null); if (b) { Methods1.Methods1.Alert(this, "修改状态成功!!"); } else { Methods1.Methods1.Alert(this, "修改状态失败!!"); } } protected void Button2_Click(object sender, EventArgs e) { string sqlstr = "update v3_order_item set isend = 2 where oid ='" + Request.QueryString["oid"].ToString() + "'"; bool b = new common().ExcuteNoneQuery(sqlstr, null); if (b) { Methods1.Methods1.Alert(this, "修改状态成功!!"); } else { Methods1.Methods1.Alert(this, "修改状态失败!!"); } } }