suc.aspx.cs
资源名称:yjal.rar [点击查看]
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:3k
源码类别:
Email客户端
开发平台:
Visual C++
- 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 suc : PageBase
- {
- SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CartConnectionString"].ConnectionString);
- protected void Page_Load(object sender, EventArgs e)
- {
- if (Session["Login"] == null)
- {
- Response.Redirect("login.aspx");
- }
- else
- {
- classDB db = new classDB();
- Int32 OID = db.InfoOID();
- String UID = Session["Login"].ToString();
- String commStirng = "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.CID =" + UID + "and OrderUser.OID=" + OID + ")";
- SqlDataAdapter mydapter = new SqlDataAdapter(commStirng, 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.CID =" + UID + "and 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 = "数据已经提交,请等待管理员发货...";
- }
- myConnection.Close();
- }
- }
- }