public ActionResult Hi_Ajax_SmallProgLimitBuy(int p = 1, long shopId = 1, string title = "")
        {
            int pageNo = p;
            LimitBuyAjaxModel model = new LimitBuyAjaxModel()
            {
                list = new List <LimitBuyContent>()
            };

            InitialSmallProgLimitBuyModel(model, shopId, title, pageNo);
            return(Json(model, JsonRequestBehavior.AllowGet));
        }
        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 InitialSmallProgLimitBuyContentModel(IQueryable <Himall.Model.FlashSaleInfo> limitBuyList, LimitBuyAjaxModel model)
        {
            var datalist = limitBuyList.ToList();

            foreach (var limitBuy in limitBuyList)
            {
                model.list.Add(new LimitBuyContent
                {
                    create_time = "",
                    item_id     = limitBuy.Id,
                    link        = "../countdowndetail/countdowndetail?id=" + limitBuy.Id,
                    title       = limitBuy.Himall_Products.ProductName,
                    endTime     = limitBuy.EndDate.ToShortDateString(),
                    startTime   = limitBuy.BeginDate.ToShortDateString(),
                    price       = limitBuy.MinPrice.ToString(),
                    shopName    = limitBuy.Himall_Shops.ShopName
                });
            }
        }
 private void InitialLimitBuyContentModel(IQueryable <Himall.Model.FlashSaleInfo> limitBuyList, LimitBuyAjaxModel model)
 {
     foreach (var limitBuy in limitBuyList)
     {
         model.list.Add(new LimitBuyContent
         {
             create_time = "",
             item_id     = limitBuy.Id,
             link        = "/m-wap/limittimebuy/detail/" + limitBuy.Id,
             title       = limitBuy.Himall_Products.ProductName,
             endTime     = limitBuy.EndDate.ToShortDateString(),
             startTime   = limitBuy.BeginDate.ToShortDateString(),
             price       = limitBuy.MinPrice.ToString(),
             shopName    = limitBuy.Himall_Shops.ShopName
         });
     }
 }