sucess.aspx.cs
资源名称:yjal.rar [点击查看]
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:7k
源码类别:
Email客户端
开发平台:
Visual C++
- using System;
- 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;
- using System.Data.SqlClient;
- public partial class sucess : PageBase
- {
- SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CartConnectionString"].ConnectionString);
- Order oo = new Order();
- public static String oid = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- oid = Request.QueryString["OID"].ToString();
- Int32 OState=oo.getOState(System.Convert.ToInt32(oid));
- if ( OState== 1)
- {
- String connStirng = "SELECT tb_GoodsInfo.GoodsName AS 商品名, submitOrder.Num AS 数量, tb_GoodsInfo.MarketPrice AS 市场价, tb_GoodsInfo.MemberPrice AS 会员价, submitOrder.SumPrice AS 总价 FROM submitOrder INNER JOIN OrderUser ON submitOrder.OID = OrderUser.OID INNER JOIN tb_GoodsInfo ON submitOrder.GoodSID = tb_GoodsInfo.GoodsID WHERE (OrderUser.OID=" + oid + ")";
- SqlDataAdapter mydapter = new SqlDataAdapter(connStirng, myConnection);
- myConnection.Open();
- DataSet myDataset = new DataSet();
- mydapter.Fill(myDataset);
- GridView1.DataSource = myDataset;
- GridView1.DataBind();
- String bindindata = "SELECT OrderUser.OID, OrderInformation.QIName, OrderInformation.QIZip, OrderInformation.QIAddress, OrderInformation.QIMobilePhone, OrderInformation.QEMail, OrderUser.OTotalPrice, OrderUser.OTotalNumber, OrderUser.OData FROM OrderInformation INNER JOIN OrderUser ON OrderInformation.OID = OrderUser.OID where (OrderUser.OID=" + oid + ")";
- SqlCommand comm = new SqlCommand(bindindata, myConnection);
- SqlDataReader dd = comm.ExecuteReader();
- if (dd.Read())
- {
- Label1.Text = System.Convert.ToString(dd.GetInt32(0));
- Label2.Text = dd.GetString(1);
- Label4.Text = System.Convert.ToString(dd.GetDouble(6));
- Label3.Text = System.Convert.ToString(dd.GetInt32(7));
- Label5.Text = dd.GetString(3);
- Label6.Text = dd.GetString(2);
- Label7.Text = dd.GetString(4);
- Label8.Text = dd.GetString(5);
- Label10.Text = System.Convert.ToString(dd.GetDateTime(8));
- Label9.Text="数据已经提交,等待管理员发货....";
- Label9.Visible = true;
- }
- }
- else if (OState == 2)
- {
- String connStirng = "SELECT tb_GoodsInfo.GoodsName AS 商品名, submitOrder.Num AS 数量, tb_GoodsInfo.MarketPrice AS 市场价, tb_GoodsInfo.MemberPrice AS 会员价, submitOrder.SumPrice AS 总价 FROM submitOrder INNER JOIN OrderUser ON submitOrder.OID = OrderUser.OID INNER JOIN tb_GoodsInfo ON submitOrder.GoodSID = tb_GoodsInfo.GoodsID WHERE (OrderUser.OID=" + oid + ")";
- SqlDataAdapter mydapter = new SqlDataAdapter(connStirng, myConnection);
- myConnection.Open();
- DataSet myDataset = new DataSet();
- mydapter.Fill(myDataset);
- GridView1.DataSource = myDataset;
- GridView1.DataBind();
- String bindindata = "SELECT OrderUser.OID, OrderInformation.QIName, OrderInformation.QIZip, OrderInformation.QIAddress, OrderInformation.QIMobilePhone, OrderInformation.QEMail, OrderUser.OTotalPrice, OrderUser.OTotalNumber, OrderUser.OData,OrderUser.SendDate FROM OrderInformation INNER JOIN OrderUser ON OrderInformation.OID = OrderUser.OID where (OrderUser.OID=" + oid + ")";
- SqlCommand comm = new SqlCommand(bindindata, myConnection);
- SqlDataReader dd = comm.ExecuteReader();
- if (dd.Read())
- {
- Label1.Text = System.Convert.ToString(dd.GetInt32(0));
- Label2.Text = dd.GetString(1);
- Label4.Text = System.Convert.ToString(dd.GetDouble(6));
- Label3.Text = System.Convert.ToString(dd.GetInt32(7));
- Label5.Text = dd.GetString(3);
- Label6.Text = dd.GetString(2);
- Label7.Text = dd.GetString(4);
- Label8.Text = dd.GetString(5);
- Label10.Text = System.Convert.ToString(dd.GetDateTime(8));
- Label9.Text = "发货日期:"+System.Convert.ToString(dd.GetDateTime(9));
- Label9.Visible = true;
- CheckBox1.Visible=true;
- Button1.Visible=true;
- }
- }
- else if (OState == 3)
- {
- String connStirng = "SELECT tb_GoodsInfo.GoodsName AS 商品名, submitOrder.Num AS 数量, tb_GoodsInfo.MarketPrice AS 市场价, tb_GoodsInfo.MemberPrice AS 会员价, submitOrder.SumPrice AS 总价 FROM submitOrder INNER JOIN OrderUser ON submitOrder.OID = OrderUser.OID INNER JOIN tb_GoodsInfo ON submitOrder.GoodSID = tb_GoodsInfo.GoodsID WHERE (OrderUser.OID=" + oid + ")";
- SqlDataAdapter mydapter = new SqlDataAdapter(connStirng, myConnection);
- myConnection.Open();
- DataSet myDataset = new DataSet();
- mydapter.Fill(myDataset);
- GridView1.DataSource = myDataset;
- GridView1.DataBind();
- String bindindata = "SELECT OrderUser.OID, OrderInformation.QIName, OrderInformation.QIZip, OrderInformation.QIAddress, OrderInformation.QIMobilePhone, OrderInformation.QEMail, OrderUser.OTotalPrice, OrderUser.OTotalNumber, OrderUser.OData,OrderUser.SendDate,OrderUser.SubmitDate FROM OrderInformation INNER JOIN OrderUser ON OrderInformation.OID = OrderUser.OID where (OrderUser.OID=" + oid + ")";
- SqlCommand comm = new SqlCommand(bindindata, myConnection);
- SqlDataReader dd = comm.ExecuteReader();
- if (dd.Read())
- {
- Label1.Text = System.Convert.ToString(dd.GetInt32(0));
- Label2.Text = dd.GetString(1);
- Label4.Text = System.Convert.ToString(dd.GetDouble(6));
- Label3.Text = System.Convert.ToString(dd.GetInt32(7));
- Label5.Text = dd.GetString(3);
- Label6.Text = dd.GetString(2);
- Label7.Text = dd.GetString(4);
- Label8.Text = dd.GetString(5);
- Label10.Text = System.Convert.ToString(dd.GetDateTime(8));
- Label9.Text = "发货日期:" + System.Convert.ToString(dd.GetDateTime(9))+"用户收货日期:"+System.Convert.ToString(dd.GetDateTime(10));
- Label9.Visible = true;
- }
- }
- myConnection.Close();
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- if (CheckBox1.Checked)
- {
- oo.updateNoSend(System.Convert.ToInt32(oid), 3);
- Label9.Text = "结束交易";
- Label9.Visible = true;
- CheckBox1.Visible = false;
- }
- }
- }