protected bool isPL = true;//是否已评论 protected override void PageLoad() { base.PageLoad(); //检查用户的待付款订单是否超时失效,超时则更新为失效状态 OrderBLL.CheckOrderPayTime(base.UserId); int orderId = RequestHelper.GetQueryString <int>("id"); userGradeName = UserGradeBLL.Read(base.GradeID).Name; order = OrderBLL.Read(orderId, base.UserId); if (order.Id <= 0) { ScriptHelper.AlertFront("订单不存在", "/user/index.html"); } //礼品 if (order.GiftId > 0) { gift = FavorableActivityGiftBLL.Read(order.GiftId); } orderDetailList = OrderDetailBLL.ReadList(orderId); int[] productIds = orderDetailList.Select(k => k.ProductId).ToArray(); if (productIds.Length > 0) { int count = 0; productList = ProductBLL.SearchList(1, productIds.Length, new ProductSearchInfo { InProductId = string.Join(",", productIds) }, ref count); } #region 判断是否已评论 List <ProductCommentInfo>[] listPinfoArr = new List <ProductCommentInfo> [productList.Count]; int pi = 0; foreach (ProductInfo item in productList) { ProductCommentSearchInfo psi = new ProductCommentSearchInfo(); psi.ProductId = item.Id; psi.UserId = base.UserId; psi.OrderID = orderId; listPinfoArr[pi] = ProductCommentBLL.SearchProductCommentList(psi); if (listPinfoArr[pi].Count <= 0) { isPL = false; } } #endregion Title = "我的订单"; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int id = RequestHelper.GetQueryString <int>("ID"); if (id != int.MinValue) { CheckAdminPower("ReadGift", PowerCheckType.Single); var gift = FavorableActivityGiftBLL.Read(id); Name.Text = gift.Name; Photo.Text = gift.Photo; Description.Text = gift.Description; } } }