-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathuser.aspx.cs
50 lines (41 loc) · 1.45 KB
/
user.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class user2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string id = Request.QueryString["id"];
Customer cus = (Customer)Session["Customer"];
List<Customer> c = new List<Customer>();
if (string.IsNullOrEmpty(id) == false && cus != null)
{
List<OrderDetails> list = DBHelper.GetODList(id);
rptOrderC.DataSource = list;
rptOrderC.DataBind();
rptiItemPing.DataSource = list;
rptiItemPing.DataBind();
Order order = DBHelper.GetOrder(int.Parse(id));
SpanOId.InnerText = order.Id.ToString();
OrderSum.InnerText = order.Price.ToString();
OrderState.InnerText = order.State;
}
c.Add(cus);
rptUser.DataSource = c;
rptUser.DataBind();
rptUpcus.DataSource = c;
rptUpcus.DataBind();
if (cus != null) //若客户登录了,获取该客户已存在的订单
{
List<Order> DDlist = OrderFactory.GetDDlist(cus);
rptDingDan.DataSource = DDlist;
rptDingDan.DataBind();
List<Product> collist = DBHelper.GetColltionList(cus.UserId);
rptCollection.DataSource = collist;
rptCollection.DataBind();
}
}
}