listOrder.aspx.cs
资源名称:yjal.rar [点击查看]
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:2k
源码类别:
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 Manage_listOrder : System.Web.UI.Page
- {
- SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CartConnectionString"].ConnectionString);
- static String connStirng = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- String info1 = Request.QueryString["type"].ToString();
- if (info1 == "notody")
- {
- connStirng = "Select Oid '订单号' ,CID '用户id', OTotalPrice '总价', OTotalNumber '总数', OData from OrderUser where datepart(year,Odata)=datepart(year,getDate()) and datepart(month,Odata)=datepart(month,getdate()) and datepart(day,Odata)=datepart(day,getdate()) and OState=1";
- conn();
- }
- else if (info1 == "nohistor")
- {
- connStirng = "Select Oid '订单号' ,CID '用户id', OTotalPrice '总价', OTotalNumber '总数', OData from OrderUser where OState=1";
- conn();
- }
- else if (info1 == "Sendtoday")
- {
- connStirng = "Select Oid '订单号' ,CID '用户id', OTotalPrice '总价', OTotalNumber '总数', OData from OrderUser where datepart(year,SendDate)=datepart(year,getDate()) and datepart(month,SendDate)=datepart(month,getdate()) and datepart(day,SendDate)=datepart(day,getdate()) and OState=2";
- conn();
- }
- else if (info1 == "Sendhistor")
- {
- connStirng = "Select Oid '订单号' ,CID '用户id', OTotalPrice '总价', OTotalNumber '总数', OData from OrderUser where OState=2";
- conn();
- }else if(info1 =="historOrder")
- {
- connStirng = "Select Oid '订单号' ,CID '用户id', OTotalPrice '总价', OTotalNumber '总数', OData from OrderUser where OState=3";
- conn();
- }
- }
- public void conn()
- {
- SqlDataAdapter mydapter = new SqlDataAdapter(connStirng, myConnection);
- myConnection.Open();
- DataSet myDataset = new DataSet();
- mydapter.Fill(myDataset);
- GridView1.DataSource = myDataset;
- GridView1.DataBind();
- }
- }