protected override void PageLoad() { base.PageLoad(); string action = RequestHelper.GetQueryString <string>("Action"); if (action == "Delete") { string deleteId = RequestHelper.GetForm <string>("id"); ProductCollectBLL.Delete(Array.ConvertAll <string, int>(deleteId.Split(','), k => Convert.ToInt32(k)), base.UserId); ResponseHelper.Write("ok"); ResponseHelper.End(); } ProductCollectList = ProductCollectBLL.ReadListByUserId(base.UserId); int count = ProductCollectList.Count; int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; ProductCollectList = ProductCollectList.Skip((currentPage - 1) * pageSize).Take(pageSize).ToList(); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); }
protected override void PageLoad() { base.PageLoad(); string action = RequestHelper.GetQueryString <string>("Action"); if (action == "ReceiveShipping") { this.ReceiveShipping(); } int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int count = 0, pageSize = 10; orderList = PointProductOrderBLL.ReadList(base.UserId); orderList = PointProductOrderBLL.SearchList(currentPage, pageSize, new PointProductOrderSearchInfo { UserId = base.UserId }, ref count); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); Title = "兑换记录"; }
protected override void PageLoad() { base.PageLoad(); isRead = RequestHelper.GetQueryString <int>("isread"); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 10; int count = 0; ReceiveMessageSearchInfo searchInfo = new ReceiveMessageSearchInfo(); searchInfo.UserID = base.UserId; searchInfo.IsRead = isRead; msgList = ReceiveMessageBLL.SearchList(currentPage, pageSize, searchInfo, ref count); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); //数量统计 var msgAllList = ReceiveMessageBLL.SearchList(new ReceiveMessageSearchInfo { UserID = base.UserId }); allCount = msgAllList.Count; readCount = msgAllList.Where(m => m.IsRead == 1).Count(); Title = "我的消息"; }
protected override void PageLoad() { base.PageLoad(); topNav = 7; int count = 0; int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 12; //浏览过的商品 strHistoryProduct = Server.UrlDecode(CookiesHelper.ReadCookieValue("HistoryProduct")); if (strHistoryProduct.StartsWith(",")) { strHistoryProduct = strHistoryProduct.Substring(1); } if (strHistoryProduct.EndsWith(",")) { strHistoryProduct = strHistoryProduct.Substring(0, strHistoryProduct.Length - 1); } if (!string.IsNullOrEmpty(strHistoryProduct)) { proHistoryList = ProductBLL.SearchList(currentPage, pageSize, new ProductSearchInfo { IsSale = 1, InProductId = strHistoryProduct }, ref count); } commonPagerClass.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); }
/// <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); } }
protected override void PageLoad() { base.PageLoad(); //检查用户的待付款订单是否超时失效,超时则更新为失效状态 OrderBLL.CheckOrderPayTime(base.UserId); type = RequestHelper.GetQueryString <string>("type"); topNav = 7; string keywords = RequestHelper.GetQueryString <string>("keywords"); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 10; int count = 0; OrderSearchInfo orderSearch = new OrderSearchInfo(); orderSearch.UserId = base.UserId; orderSearch.IsDelete = 0; if (!string.IsNullOrEmpty(keywords)) { orderSearch.OrderNumber = keywords; } if (!string.IsNullOrEmpty(type)) { int tt = 0; switch (type) { case "2": tt = 2; break; case "3": tt = 4; break; case "4": tt = 5; break; case "1": tt = 1; break; } orderSearch.OrderStatus = tt; } orderList = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count); commonPagerClass.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); #region 对应状态个数 arrT[0] = OrderBLL.SearchList(new OrderSearchInfo { UserId = base.UserId, IsDelete = 0 }).Count; orderSearch.OrderStatus = 2; arrT[1] = OrderBLL.SearchList(orderSearch).Count; orderSearch.OrderStatus = 1; arrT[2] = OrderBLL.SearchList(orderSearch).Count; orderSearch.OrderStatus = 5; arrT[3] = OrderBLL.SearchList(orderSearch).Count; #endregion }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); ArticleSearchInfo articleSearch = new ArticleSearchInfo(); id = RequestHelper.GetQueryString <int>("ID"); if (id <= 0) { id = 38; } curArticleClass = ArticleClassBLL.Read(id); articleSearch.ClassId = "|" + curArticleClass.Id + "|"; articleSearch.IsTop = (int)BoolType.True; int count = int.MinValue; topArticleList = ArticleBLL.SearchList(1, 15, articleSearch, ref count); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; count = 0; if (id > 0) { articleSearch.ClassId = "|" + id + "|"; } articleList = ArticleBLL.SearchList(currentPage, pageSize, articleSearch, ref count); commonPagerClass.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); //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; //Title = "新闻资讯"; }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); user = UserBLL.ReadUserMore(base.UserId); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; int count = 0; BookingProductSearchInfo bookingProductSearch = new BookingProductSearchInfo(); bookingProductSearch.UserID = base.UserId; bookingProductList = BookingProductBLL.SearchBookingProductList(currentPage, pageSize, bookingProductSearch, ref count); commonPagerClass.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); }
protected override void PageLoad() { base.PageLoad(); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; int count = 0; productCommentList = ProductCommentBLL.SearchList(currentPage, pageSize, new ProductCommentSearchInfo { UserId = base.UserId }, ref count); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); }
protected override void PageLoad() { base.PageLoad(); string displayType = RequestHelper.GetQueryString <string>("v"); if (displayType != "p" && displayType != "m") { ResponseHelper.End(); } isViewPoint = displayType == "p"; int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; int count = 0; var recordType = isViewPoint ? AccountRecordType.Point : AccountRecordType.Money; userAccountRecordList = UserAccountRecordBLL.ReadList(currentPage, pageSize, recordType, base.UserId, ref count); // if (isViewPoint) { left = UserAccountRecordBLL.SumPoint(base.UserId); } else { if (!string.IsNullOrEmpty(CurrentUser.CardNo) && !string.IsNullOrEmpty(CurrentUser.CardPwd)) { bool isSuccess; string msg; //account = WebService.Account.GetAccount(CurrentUser.CardNo, CurrentUser.CardPwd, out isSuccess, out msg); //left = account.Acc; } } pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); Title = isViewPoint ? "我的积分" : "我的余额"; }
protected override void PageLoad() { base.PageLoad(); int currentPage = RequestHelper.GetQueryString <int>("Page"); string orderNumber = StringHelper.SearchSafe(RequestHelper.GetQueryString <string>("OrderNum")); orderStatus = RequestHelper.GetQueryString <int>("s"); if (currentPage < 1) { currentPage = 1; } int pageSize = 10; int count = 0; OrderSearchInfo orderSearch = new OrderSearchInfo(); if (!string.IsNullOrEmpty(orderNumber)) { orderSearch.OrderNumber = orderNumber; } if (orderStatus > 0) { orderSearch.OrderStatus = orderStatus; } if (CurrentUser.UserType == (int)UserType.Member) { orderSearch.UserId = base.UserId; } else { orderSearch.ShopId = base.UserId; } orderSearch.IsDelete = (int)BoolType.False; orderList = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count); dt = CurrentUser.UserType == (int)UserType.Member ? UserBLL.UserIndexStatistics(base.UserId) : UserBLL.ShopIndexStatistics(base.UserId); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); Title = "我的订单"; }
protected override void PageLoad() { base.PageLoad(); //热门商品 int hotCount = 0; hotProductList = ProductBLL.SearchList(1, 7, new ProductSearchInfo { IsHot = (int)BoolType.True, IsSale = (int)BoolType.True }, ref hotCount); //商品列表 currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 24; int count = 0; List <ProductBrandInfo> showBrandList = new List <ProductBrandInfo>(); List <ProductTypeAttributeInfo> showAttributeList = new List <ProductTypeAttributeInfo>(); string orderField = RequestHelper.GetQueryString <string>("sort"); string orderType = ""; var orderParams = orderField.Split('_'); if (orderParams.Length > 1) { orderField = orderParams[0]; orderType = orderParams[1]; } int minPrice = RequestHelper.GetQueryString <int>("min"); int maxPrice = RequestHelper.GetQueryString <int>("max"); string keywords = RequestHelper.GetQueryString <string>("kw"); string isNew = RequestHelper.GetQueryString <string>("isNew"); string isHot = RequestHelper.GetQueryString <string>("isHot"); string isSpecial = RequestHelper.GetQueryString <string>("isSpecial"); string isTop = RequestHelper.GetQueryString <string>("isTop"); //productList = ProductBLL.SearchList(currentPage, pageSize, 0, "", "", "", orderField, orderType, minPrice, maxPrice, keywords, isNew, isHot, isSpecial, isTop, ref count, ref showAttributeList, ref showBrandList); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); }
protected override void PageLoad() { base.PageLoad(); if (base.UserId > 0) { CurrentUser = UserBLL.ReadUserMore(base.UserId); } int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 12; int count = 0; pointProductList = PointProductBLL.SearchList(currentPage, pageSize, new PointProductSearchInfo { IsSale = (int)BoolType.True, ValidDate = DateTime.Now }, ref count); pager.Init(currentPage, pageSize, count, false); Title = "积分兑换商品"; }
protected override void PageLoad() { base.PageLoad(); ProductSearchInfo searchInfo = new ProductSearchInfo(); searchInfo.IsNew = (int)BoolType.True; searchInfo.ProductOrderType = "AddDate"; searchInfo.OrderType = OrderType.Desc; int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 50; int count = 0; productList = ProductBLL.SearchList(currentPage, pageSize, searchInfo, ref count); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); Title = "新品上市"; }
protected override void PageLoad() { base.PageLoad(); var queryClass = RequestHelper.GetQueryString <string>("cat").Split(','); int classLevel1 = 0, classLevel2 = 0, classLevel3 = 0; if (queryClass.Length > 0) { classLevel1 = ShopCommon.ConvertToT <int>(queryClass[0]); } if (queryClass.Length > 1) { classLevel2 = ShopCommon.ConvertToT <int>(queryClass[1]); } if (queryClass.Length > 2) { classLevel3 = ShopCommon.ConvertToT <int>(queryClass[2]); } int currentClassId = classLevel3 > 0 ? classLevel3 : classLevel2 > 0 ? classLevel2 : classLevel1; if (currentClassId < 1) { ResponseHelper.Redirect("/"); } if (classLevel1 > 0) { switch (classLevel1) { case 1: topNav = 2; break; case 2: topNav = 3; break; case 4: topNav = 4; break; case 6: topNav = 5; break; } } //面包屑区域--分类 showClassList = ProductClassBLL.ReadList(); currentClass = showClassList.FirstOrDefault(k => k.Id == currentClassId) ?? new ProductClassInfo(); levelClass.Add("level1", showClassList.FirstOrDefault(k => k.Id == classLevel1) ?? new ProductClassInfo()); levelClass.Add("level2", showClassList.FirstOrDefault(k => k.Id == classLevel2) ?? new ProductClassInfo()); levelClass.Add("level3", showClassList.FirstOrDefault(k => k.Id == classLevel3) ?? new ProductClassInfo()); //热门商品 int hotCount = 0; hotProductList = ProductBLL.SearchList(1, 7, new ProductSearchInfo { IsHot = (int)BoolType.True, IsSale = (int)BoolType.True }, ref hotCount); //商品列表 currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 15; int count = 0; string brandIds = RequestHelper.GetQueryString <string>("brand"); string attributeIds = RequestHelper.GetQueryString <string>("at"); string attributeValues = RequestHelper.GetQueryString <string>("ex"); string orderField = RequestHelper.GetQueryString <string>("sort"); string orderType = ""; var orderParams = orderField.Split('_'); if (orderParams.Length > 1) { orderField = orderParams[0]; orderType = orderParams[1]; } int minPrice = RequestHelper.GetQueryString <int>("min"); int maxPrice = RequestHelper.GetQueryString <int>("max"); string keywords = RequestHelper.GetQueryString <string>("kw"); int isNew = RequestHelper.GetQueryString <int>("isNew"); int isHot = RequestHelper.GetQueryString <int>("isHot"); int isSpecial = RequestHelper.GetQueryString <int>("isSpecial"); int isTop = RequestHelper.GetQueryString <int>("isTop"); productList = ProductBLL.SearchList(currentPage, pageSize, currentClassId, brandIds, attributeIds, attributeValues, orderField, orderType, minPrice, maxPrice, keywords, "", isNew, isHot, isSpecial, isTop, ref count, ref showAttributeList, ref showBrandList); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); //pager.CurrentPage = currentPage; //pager.PageSize = pageSize; //pager.Count = count; //pager.FirstPage = "<<首页"; //pager.PreviewPage = "<<上一页"; //pager.NextPage = "下一页>>"; //pager.LastPage = "末页>>"; //pager.ListType = false; //pager.DisCount = false; //pager.PrenextType = true; ProductClassInfo thisProductClass = new ProductClassInfo(); if (classLevel3 > 0) { thisProductClass = ProductClassBLL.Read(classLevel3); } else if (classLevel2 > 0) { thisProductClass = ProductClassBLL.Read(classLevel2); } else { thisProductClass = ProductClassBLL.Read(classLevel1); } Title = thisProductClass.PageTitle.Trim() == "" ? thisProductClass.Name : thisProductClass.PageTitle; Keywords = thisProductClass.PageKeyWord.Trim() == "" ? thisProductClass.Name : thisProductClass.PageKeyWord; Description = thisProductClass.PageSummary.Trim() == "" ? thisProductClass.Remark : thisProductClass.PageSummary; }
protected override void PageLoad() { base.PageLoad(); type = RequestHelper.GetQueryString <string>("type"); topNav = 7; if (type == "") { type = "1"; } string keywords = RequestHelper.GetQueryString <string>("keywords"); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 10; int count = 0; OrderSearchInfo orderSearch = new OrderSearchInfo(); orderSearch.UserId = base.UserId; orderSearch.IsDelete = 0; if (!string.IsNullOrEmpty(keywords)) { orderSearch.OrderNumber = keywords; } if (!string.IsNullOrEmpty(type) && type != "1") { int tt = 0; switch (type) { case "2": tt = 2; break; case "3": tt = 4; break; case "4": tt = 5; break; } orderSearch.OrderStatus = tt; } orderList = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count); //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)); #region 对应状态个数 //OrderSearchInfo orderSearch1 = new OrderSearchInfo(); //orderSearch1.UserId = base.UserId; //if (!string.IsNullOrEmpty(keywords)) //{ // orderSearch1.OrderNumber = keywords; //} arrT[0] = OrderBLL.SearchList(currentPage, pageSize, new OrderSearchInfo { UserId = base.UserId, IsDelete = 0 }, ref count).Count; orderSearch.OrderStatus = 2; arrT[1] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; orderSearch.OrderStatus = 4; arrT[2] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; orderSearch.OrderStatus = 5; arrT[3] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; #endregion }
//protected ProductClassInfo currentClass = new ProductClassInfo(); //protected string baseQueryString; //protected CommonPagerClass pager = new CommonPagerClass(); //protected int currentPage; ////商品列表数据 //protected List<ProductInfo> productList = new List<ProductInfo>(); //protected List<ProductInfo> hotProductList = new List<ProductInfo>(); protected override void PageLoad() { base.PageLoad(); //热门商品 int hotCount = 0; hotProductList = ProductBLL.SearchList(1, 5, new ProductSearchInfo { IsHot = (int)BoolType.True, IsSale = (int)BoolType.True }, ref hotCount); //商品列表 currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 10; int count = 0; List <ProductBrandInfo> showBrandList = new List <ProductBrandInfo>(); List <ProductTypeAttributeInfo> showAttributeList = new List <ProductTypeAttributeInfo>(); string orderField = RequestHelper.GetQueryString <string>("sort"); string orderType = ""; var orderParams = orderField.Split('_'); if (orderParams.Length > 1) { orderField = orderParams[0]; orderType = orderParams[1]; } int minPrice = RequestHelper.GetQueryString <int>("min"); int maxPrice = RequestHelper.GetQueryString <int>("max"); keywords = RequestHelper.GetQueryString <string>("kw"); int isNew = RequestHelper.GetQueryString <int>("isNew"); int isHot = RequestHelper.GetQueryString <int>("isHot"); int isSpecial = RequestHelper.GetQueryString <int>("isSpecial"); int isTop = RequestHelper.GetQueryString <int>("isTop"); #region 记录搜索纪录 if (keywords != string.Empty) { string historySearch = CookiesHelper.ReadCookieValue("HistorySearch"); if (historySearch == string.Empty) { historySearch = keywords; } else { historySearch = keywords + "," + historySearch; } if (historySearch.IndexOf(",") > -1) { if (historySearch.Split(',').Length > 8) { historySearch = historySearch.Substring(0, historySearch.LastIndexOf(",")); } } CookiesHelper.AddCookie("HistorySearch", historySearch); } #endregion productList = ProductBLL.SearchList(currentPage, pageSize, 0, "", "", "", orderField, orderType, minPrice, maxPrice, keywords, "", isNew, isHot, isSpecial, isTop, ref count, ref showAttributeList, ref showBrandList); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); }
protected override void PageLoad() { base.PageLoad(); //检查用户的待付款订单是否超时失效,超时则更新为失效状态 OrderBLL.CheckOrderPayTime(base.UserId); type = RequestHelper.GetQueryString <string>("type"); cartList = CartBLL.ReadList(base.UserId); topNav = 7; keywords = RequestHelper.GetQueryString <string>("keywords"); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 10; int count = 0; OrderSearchInfo orderSearch = new OrderSearchInfo(); orderSearch.UserId = base.UserId; orderSearch.IsDelete = 0; if (!string.IsNullOrEmpty(keywords)) { orderSearch.OrderNumber = keywords; } if (!string.IsNullOrEmpty(type)) { int tt = 0; switch (type) { case "1": tt = (int)OrderStatus.WaitPay; break; case "2": tt = (int)OrderStatus.WaitCheck; break; case "3": tt = (int)OrderStatus.Shipping; break; case "4": tt = (int)OrderStatus.HasShipping; break; case "5": tt = (int)OrderStatus.NoEffect; break; } orderSearch.OrderStatus = tt; } orderList = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count); //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)); proListHot = ProductBLL.SearchList(1, 12, new ProductSearchInfo { IsHot = 1, }, ref count); #region 对应状态个数 //OrderSearchInfo orderSearch1 = new OrderSearchInfo(); //orderSearch1.UserId = base.UserId; //if (!string.IsNullOrEmpty(keywords)) //{ // orderSearch1.OrderNumber = keywords; //} arrT[0] = OrderBLL.SearchList(currentPage, pageSize, new OrderSearchInfo { UserId = base.UserId, IsDelete = 0 }, ref count).Count; orderSearch.OrderStatus = (int)(OrderStatus.WaitPay); arrT[1] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; orderSearch.OrderStatus = (int)(OrderStatus.Shipping); arrT[2] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; orderSearch.OrderStatus = (int)(OrderStatus.HasShipping); arrT[3] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; orderSearch.OrderStatus = (int)(OrderStatus.WaitCheck); arrT[4] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; orderSearch.OrderStatus = (int)(OrderStatus.NoEffect); arrT[5] = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count).Count; #endregion }
protected override void PageLoad() { base.PageLoad(); var queryClass = RequestHelper.GetQueryString <string>("cat").Split(','); int classLevel1 = 0, classLevel2 = 0, classLevel3 = 0; if (queryClass.Length > 0) { classLevel1 = ShopCommon.ConvertToT <int>(queryClass[0]); } if (queryClass.Length > 1) { classLevel2 = ShopCommon.ConvertToT <int>(queryClass[1]); } if (queryClass.Length > 2) { classLevel3 = ShopCommon.ConvertToT <int>(queryClass[2]); } int currentClassId = classLevel3 > 0 ? classLevel3 : classLevel2 > 0 ? classLevel2 : classLevel1; if (currentClassId < 1) { ResponseHelper.Redirect("/"); } //面包屑区域--分类 showClassList = ProductClassBLL.ReadList(); currentClass = showClassList.FirstOrDefault(k => k.Id == currentClassId) ?? new ProductClassInfo(); levelClass.Add("level1", showClassList.FirstOrDefault(k => k.Id == classLevel1) ?? new ProductClassInfo()); levelClass.Add("level2", showClassList.FirstOrDefault(k => k.Id == classLevel2) ?? new ProductClassInfo()); levelClass.Add("level3", showClassList.FirstOrDefault(k => k.Id == classLevel3) ?? new ProductClassInfo()); //热门商品 int hotCount = 0; hotProductList = ProductBLL.SearchList(1, 7, new ProductSearchInfo { IsHot = (int)BoolType.True, IsSale = (int)BoolType.True }, ref hotCount); //商品列表 currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 24; int count = 0; string brandIds = RequestHelper.GetQueryString <string>("brand"); string attributeIds = RequestHelper.GetQueryString <string>("at"); string attributeValues = RequestHelper.GetQueryString <string>("ex"); string orderField = RequestHelper.GetQueryString <string>("sort"); string orderType = ""; var orderParams = orderField.Split('_'); if (orderParams.Length > 1) { orderField = orderParams[0]; orderType = orderParams[1]; } int minPrice = RequestHelper.GetQueryString <int>("min"); int maxPrice = RequestHelper.GetQueryString <int>("max"); string keywords = RequestHelper.GetQueryString <string>("kw"); string isNew = RequestHelper.GetQueryString <string>("isNew"); string isHot = RequestHelper.GetQueryString <string>("isHot"); string isSpecial = RequestHelper.GetQueryString <string>("isSpecial"); string isTop = RequestHelper.GetQueryString <string>("isTop"); //productList = ProductBLL.SearchList(currentPage, pageSize, 0, "", "", "", orderField, orderType, minPrice, maxPrice, keywords, isNew,isHot,isSpecial,isTop, ref count, ref showAttributeList, ref showBrandList); pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); }
protected override void PageLoad() { base.PageLoad(); type = RequestHelper.GetQueryString <string>("type"); int currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 10; int count = 0; UserCouponSearchInfo userCouponSearch = new UserCouponSearchInfo(); userCouponSearch.UserId = base.UserId; if (!string.IsNullOrEmpty(type)) { if (type == "1")//未使用 { userCouponSearch.IsUse = (int)BoolType.False; userCouponSearch.IsTimeOut = (int)BoolType.False; } else if (type == "2")//已使用 { userCouponSearch.IsUse = (int)BoolType.True; userCouponSearch.IsTimeOut = -1;//不限期限有没过期 } else//已过期 { userCouponSearch.IsUse = (int)BoolType.False; userCouponSearch.IsTimeOut = (int)BoolType.True; } } else //所有 { userCouponSearch.IsTimeOut = -1; } userCouponList = UserCouponBLL.SearchList(currentPage, pageSize, userCouponSearch, ref count); commonPagerClass.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); string idList = string.Empty; foreach (UserCouponInfo userCoupon in userCouponList) { if (idList == string.Empty) { idList = userCoupon.CouponId.ToString(); } else { idList += "," + userCoupon.CouponId.ToString(); } } if (idList != string.Empty) { CouponSearchInfo couponSearch = new CouponSearchInfo(); couponSearch.InCouponIds = Array.ConvertAll <string, int>(idList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), i => Convert.ToInt32(i)); couponList = CouponBLL.SearchList(couponSearch); } }
protected override void PageLoad() { base.PageLoad(); var queryClass = StringHelper.AddSafe(HttpUtility.UrlDecode(RequestHelper.GetQueryString <string>("cat"))).Split(','); int classLevel1 = 0, classLevel2 = 0, classLevel3 = 0; if (queryClass.Length > 0) { classLevel1 = ShopCommon.ConvertToT <int>(queryClass[0]); } if (queryClass.Length > 1) { classLevel2 = ShopCommon.ConvertToT <int>(queryClass[1]); } if (queryClass.Length > 2) { classLevel3 = ShopCommon.ConvertToT <int>(queryClass[2]); } int currentClassId = classLevel3 > 0 ? classLevel3 : classLevel2 > 0 ? classLevel2 : classLevel1; //if (currentClassId < 1) ResponseHelper.Redirect("/"); if (currentClassId < 1) { currentClassId = 0; } if (classLevel1 > 0) { switch (classLevel1) { case 1: topNav = 2; break; case 2: topNav = 3; break; case 4: topNav = 4; break; case 6: topNav = 5; break; } } //面包屑区域--分类 showClassList = ProductClassBLL.ReadList(); currentClass = showClassList.FirstOrDefault(k => k.Id == currentClassId) ?? new ProductClassInfo(); levelClass.Add("level1", showClassList.FirstOrDefault(k => k.Id == classLevel1) ?? new ProductClassInfo()); levelClass.Add("level2", showClassList.FirstOrDefault(k => k.Id == classLevel2) ?? new ProductClassInfo()); levelClass.Add("level3", showClassList.FirstOrDefault(k => k.Id == classLevel3) ?? new ProductClassInfo()); if (currentClassId < 1) { currentClassId = 0; } //热门商品 int hotCount = 0; if (currentClassId > 0) { hotProductList = ProductBLL.SearchList(1, 5, new ProductSearchInfo { IsHot = (int)BoolType.True, IsSale = (int)BoolType.True, IsDelete = (int)BoolType.False, ClassId = "|" + currentClassId + "|" }, ref hotCount); } else { hotProductList = ProductBLL.SearchList(1, 5, new ProductSearchInfo { IsHot = (int)BoolType.True, IsSale = (int)BoolType.True, IsDelete = (int)BoolType.False }, ref hotCount); } //商品列表 currentPage = RequestHelper.GetQueryString <int>("Page"); if (currentPage < 1) { currentPage = 1; } int pageSize = 20; int count = 0; string brandIds = StringHelper.AddSafe(HttpUtility.UrlDecode(RequestHelper.GetQueryString <string>("brand"))); string attributeIds = StringHelper.AddSafe(HttpUtility.UrlDecode(RequestHelper.GetQueryString <string>("at"))); string attributeValues = StringHelper.AddSafe(HttpUtility.UrlDecode(RequestHelper.GetQueryString <string>("ex"))); string orderField = StringHelper.AddSafe(HttpUtility.UrlDecode(RequestHelper.GetQueryString <string>("sort"))); string orderType = ""; var orderParams = orderField.Split('_'); if (orderParams.Length > 1) { orderField = orderParams[0]; orderType = orderParams[1]; } int minPrice = RequestHelper.GetQueryString <int>("min"); int maxPrice = RequestHelper.GetQueryString <int>("max"); keywords = StringHelper.AddSafe(HttpUtility.UrlDecode(RequestHelper.GetQueryString <string>("kw"))); string stf_Keyword = StringHelper.AddSafe(HttpUtility.UrlDecode(RequestHelper.GetQueryString <string>("stf_Keyword"))); if (!string.IsNullOrEmpty(stf_Keyword)) { if (string.IsNullOrEmpty(keywords)) { keywords = stf_Keyword; } } int isNew = RequestHelper.GetQueryString <int>("isNew"); int isHot = RequestHelper.GetQueryString <int>("isHot"); int isSpecial = RequestHelper.GetQueryString <int>("isSpecial"); int isTop = RequestHelper.GetQueryString <int>("isTop"); productList = ProductBLL.SearchList(currentPage, pageSize, currentClassId, brandIds, attributeIds, attributeValues, orderField, orderType, minPrice, maxPrice, keywords, stf_Keyword, isNew, isHot, isSpecial, isTop, ref count, ref showAttributeList, ref showBrandList); pagecount = (int)Math.Round((double)(count + 0.1) / pageSize, 0); if (pagecount <= 0) { pagecount = 1; } pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile)); pager.ShowType = 3; #region 如果没有查找到商品则显示RequestHelper.GetQueryString<string>("brand")获取的所有品牌 if (count <= 0) { string[] _brandids = brandIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); int[] _showbrandids = Array.ConvertAll <string, int>(_brandids, s => Convert.ToInt32(s)); showBrandList = ProductBrandBLL.ReadList(_showbrandids); } #endregion #region 添加热门关键词 //如果有搜索结果且关键词不为空 if (productList.Count > 0 && !string.IsNullOrEmpty(keywords)) { var theSearchKey = HotSearchKeyBLL.Read(keywords); //之前没有则增加 if (theSearchKey.Id <= 0) { theSearchKey.Name = StringHelper.AddSafe(HttpUtility.HtmlEncode(keywords)); theSearchKey.SearchTimes = 1; HotSearchKeyBLL.Add(theSearchKey); } else { //有则修改更新搜索次数 theSearchKey.SearchTimes += 1; HotSearchKeyBLL.Update(theSearchKey); } } #endregion if (classLevel3 > 0) { thisProductClass = ProductClassBLL.Read(classLevel3); } else if (classLevel2 > 0) { thisProductClass = ProductClassBLL.Read(classLevel2); } else { thisProductClass = ProductClassBLL.Read(classLevel1); } //浏览过的商品 strHistoryProduct = Server.UrlDecode(CookiesHelper.ReadCookieValue("HistoryProduct")); if (strHistoryProduct.StartsWith(",")) { strHistoryProduct = strHistoryProduct.Substring(1); } if (strHistoryProduct.EndsWith(",")) { strHistoryProduct = strHistoryProduct.Substring(0, strHistoryProduct.Length - 1); } ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductId = strHistoryProduct; productSearch.IsSale = 1; productSearch.IsDelete = 0; tempProductList = ProductBLL.SearchList(productSearch); Title = thisProductClass.PageTitle.Trim() == "" ? thisProductClass.Name : thisProductClass.PageTitle; Keywords = thisProductClass.PageKeyWord.Trim() == "" ? thisProductClass.Name : thisProductClass.PageKeyWord; //Description = thisProductClass.PageSummary.Trim() == "" ? thisProductClass.Remark : thisProductClass.PageSummary; Description = thisProductClass.PageSummary; }