/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); user = UserBLL.ReadUserMore(base.UserId); userGradeName = UserGradeBLL.Read(base.GradeID).Name; int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; int count = 0; productReplyList = ProductReplyBLL.ReadProductReplyList(currentPage, pageSize, ref count, base.UserId); commonPagerClass.CurrentPage = currentPage; commonPagerClass.PageSize = pageSize; commonPagerClass.Count = count; commonPagerClass.FirstPage = "<<首页"; commonPagerClass.PreviewPage = "<<上一页"; commonPagerClass.NextPage = "下一页>>"; commonPagerClass.LastPage = "末页>>"; commonPagerClass.ListType = false; commonPagerClass.DisCount = false; commonPagerClass.PrenextType = true; }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); user = UserBLL.ReadUserMore(base.UserId); userGradeId = UserGradeBLL.Read(base.GradeID).Id; string action = RequestHelper.GetQueryString <string>("Action"); if (action == "Delete") { string deleteID = RequestHelper.GetQueryString <string>("ID"); ProductCollectBLL.Delete(Array.ConvertAll(deleteID.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), k => Convert.ToInt32(k)), base.UserId); ResponseHelper.Write("ok"); ResponseHelper.End(); } int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; int count = 0; productCollectList = ProductCollectBLL.ReadList(currentPage, pageSize, ref count, base.UserId); //commonPagerClass.CurrentPage = currentPage; //commonPagerClass.PageSize = pageSize; //commonPagerClass.Count = count; //commonPagerClass.FirstPage = "<<首页"; //commonPagerClass.PreviewPage = "<<上一页"; //commonPagerClass.NextPage = "下一页>>"; //commonPagerClass.LastPage = "末页>>"; //commonPagerClass.ListType = false; //commonPagerClass.DisCount = false; //commonPagerClass.PrenextType = true; commonPagerClass.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); string strProductID = string.Empty; foreach (ProductCollectInfo productCollect in productCollectList) { if (strProductID == string.Empty) { strProductID = productCollect.ProductId.ToString(); } else { strProductID += "," + productCollect.ProductId.ToString(); } } if (strProductID != string.Empty) { ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductId = strProductID; productList = ProductBLL.SearchList(productSearch); } }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); user = UserBLL.Read(base.UserId); userGradeName = UserGradeBLL.Read(base.GradeID).Name; singleUnlimitClass.DataSource = RegionBLL.ReadRegionUnlimitClass(); singleUnlimitClass.ClassID = user.RegionId; }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); int id = RequestHelper.GetQueryString <int>("ID"); userMessage = UserMessageBLL.Read(id, base.UserId); user = UserBLL.ReadUserMore(base.UserId); userGradeName = UserGradeBLL.Read(base.GradeID).Name; }
protected bool isPL = true; //是否已评论 /// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); user = UserBLL.ReadUserMore(base.UserId); userGradeName = UserGradeBLL.Read(base.GradeID).Name; int orderID = RequestHelper.GetQueryString <int>("ID"); order = OrderBLL.Read(orderID, base.UserId); if (order.OrderStatus != (int)OrderStatus.ReceiveShipping) { ScriptHelper.AlertFront("只能评论已收货订单"); } orderDetailList = OrderDetailBLL.ReadList(orderID); #region 加载订单下产品 string strProductID = string.Empty; foreach (OrderDetailInfo orderDetail in orderDetailList) { if (strProductID == string.Empty) { strProductID = orderDetail.ProductId.ToString(); } else { strProductID += "," + orderDetail.ProductId.ToString(); } } if (strProductID != string.Empty) { ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductId = strProductID; productList = ProductBLL.SearchList(productSearch); } #endregion #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 if (isPL) { Response.Redirect("/User/OrderDetail.html?ID=" + orderID); } }
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 = "我的订单"; }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); topNav = 12; if (RequestHelper.RawUrl.ToLower().IndexOf("/mobile/") >= 0) { base.CheckUserLogin(1); } else { base.CheckUserLogin(0); } userGradeName = UserGradeBLL.Read(base.GradeID).Name; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int userGradeID = RequestHelper.GetQueryString <int>("ID"); if (userGradeID != int.MinValue) { CheckAdminPower("ReadUserGrade", PowerCheckType.Single); UserGradeInfo userGrade = UserGradeBLL.Read(userGradeID); Name.Text = userGrade.Name; MinMoney.Text = userGrade.MinMoney.ToString(); MaxMoney.Text = userGrade.MaxMoney.ToString(); Discount.Text = userGrade.Discount.ToString(); } } }
/// <summary> /// 检查cookies /// </summary> /// <returns></returns> private void ReadUserCookies() { string cookiesName = ShopConfig.ReadConfigInfo().UserCookies; if (CookiesHelper.ReadCookie(cookiesName) != null) { string cookiesValue = CookiesHelper.ReadCookieValue(cookiesName); if (!string.IsNullOrEmpty(cookiesValue)) { try { string[] strArray = cookiesValue.Split(new char[] { '|' }); string sign = strArray[0]; string userID = strArray[1]; string userName = strArray[2]; string gradeID = strArray[3]; if (FormsAuthentication.HashPasswordForStoringInConfigFile(userID + userName + gradeID.ToString() + ShopConfig.ReadConfigInfo().SecureKey + ClientHelper.Agent, "MD5").ToLower() == sign.ToLower()) { UserId = Convert.ToInt32(userID); UserName = HttpContext.Current.Server.UrlDecode(userName); GradeID = Convert.ToInt32(gradeID); } else { CookiesHelper.DeleteCookie(cookiesName); } } catch { CookiesHelper.DeleteCookie(cookiesName); } } } if (GradeID == 0) { GradeID = UserGradeBLL.ReadByMoney(0).Id; } UserGrade = UserGradeBLL.Read(GradeID).Name; UserGrade = string.IsNullOrEmpty(UserGrade) ? "游客" : UserGrade; }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); user = UserBLL.ReadUserMore(base.UserId); userGradeName = UserGradeBLL.Read(base.GradeID).Name; }