private void InitialBonusModel(BonusAjaxModel model, string name = "", int pageNo = 1) { var brandList = _iBonusService.Get(1, 1, name, pageNo, 10); int pageCount = TemplatePageHelper.GetPageCount(brandList.Total, 10); if (brandList != null) { model.status = 1; model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo); InitialBonusContentModel(brandList.Models, model); } }
private void InitialPhotoSpaceModel(PhotoSpaceAjaxModel model, ObsoletePageModel <PhotoSpaceInfo> photo, int pageNo = 1) { var list = new List <photoContent>(); int pageCount = TemplatePageHelper.GetPageCount(photo.Total, 24); model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo); foreach (var item in photo.Models) { list.Add(new photoContent { file = Core.HimallIO.GetRomoteImagePath(item.PhotoPath), id = item.Id.ToString(), name = item.PhotoName }); } model.data = list; }
private void InitialCateModel(TopicAjaxModel model, string name, int pageNo) { var topicList = _iTopicService.GetTopics(new IServices.QueryModel.TopicQuery { PageNo = pageNo, PageSize = 10, PlatformType = Core.PlatformType.Mobile, Name = name }); int pageCount = TemplatePageHelper.GetPageCount(topicList.Total, 10); if (topicList != null) { model.status = 1; model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo); InitialCateContentModel(topicList.Models, model); } }
private void InitialProductModel(ProductAjaxModel model, int status, string name, int pageNo) { var productList = _iProductService.GetProducts(new IServices.QueryModel.ProductQuery { AuditStatus = new ProductInfo.ProductAuditStatus[] { (ProductInfo.ProductAuditStatus)status }, KeyWords = name, PageNo = pageNo, PageSize = 10, Sort = "Id", IsAsc = true }); int pageCount = TemplatePageHelper.GetPageCount(productList.Total, 10); if (productList != null) { model.status = 1; model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo); InitialProductContentModel(productList.Models, model); } }
private void InitialSmallProgLimitBuyModel(LimitBuyAjaxModel model, long shopId, string name = "", int pageNo = 1) { var limitBuyList = _iLimitTimeBuyService.GetAll( new IServices.QueryModel.FlashSaleQuery { ItemName = name, ShopId = null, //取所有 PageNo = pageNo, PageSize = 10, AuditStatus = Himall.Model.FlashSaleInfo.FlashSaleStatus.Ongoing, CheckProductStatus = true }); int pageCount = TemplatePageHelper.GetPageCount(limitBuyList.Total, 10); if (limitBuyList != null) { model.status = 1; model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo); InitialSmallProgLimitBuyContentModel(limitBuyList.Models, model); } }
private void SmallProInitialCouponsModel(CouponsAjaxModel model, long shopId, string name = "", int pageNo = 1) { var couponsList = _iCouponService.GetCouponList(new Himall.IServices.QueryModel.CouponQuery { CouponName = name, IsOnlyShowNormal = true, IsShowAll = false, ShowPlatform = Himall.Core.PlatformType.Wap, PageNo = pageNo, PageSize = 10 }); int pageCount = TemplatePageHelper.GetPageCount(couponsList.Total, 10); if (couponsList != null) { model.status = 1; model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo); SmallProInitialCouponsContentModel(couponsList.Models, model); } }