Exemplo n.º 1
0
        public ActionResult Ajax_QueryMyFavorite()
        {
            var result = new AjaxResult {
                Success = true
            };
            int pageIndex = int.Parse(Request["PageIndex"]);

            Nesoft.ECWeb.Entity.PageInfo pageInfo = new Entity.PageInfo();
            pageInfo.PageIndex = pageIndex;
            pageInfo.PageSize  = 10;

            var user = UserManager.ReadUserInfo();

            var data       = CustomerFacade.GetMyFavoriteProductList(user.UserSysNo, pageInfo);
            var wishSysNos = CookieHelper.GetCookie <List <int> >("DeletedFavorite") ?? new List <int>();

            data.ResultList.RemoveAll(p => wishSysNos.Any(q => p.WishSysNo == q));
            data.ResultList.ForEach(p =>
            {
                p.DefaultImage = ProductFacade.BuildProductImage(ImageSize.P60, p.DefaultImage);
            });
            result.Data = data;

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <returns></returns>
 public JsonResult loadjson(Entity.PageInfo page, string channel, int detailid = -1, int reviewid = 0, int verify = 0)
 {
     using (var manage = new Data.CMSManage())
     {
         var list = manage.getReviewList(page, channel, detailid, reviewid, 0, verify);
         return(getPagination(page.TotalCount, page.PageNumber, list));
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <returns></returns>
 public JsonResult loadjson(Entity.PageInfo page, int itemid = 0)
 {
     using (var manage = new Data.CMSManage())
     {
         var list = manage.getDetailList(page, null, itemid, 0, 0, -1, true);
         return(this.getPagination(page.TotalCount, page.PageNumber, list));
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <returns></returns>
 public JsonResult loadjson(Entity.PageInfo page)
 {
     using (var manage = new Data.CMSManage())
     {
         var list = manage.getUserList(page, null, verify: 0);
         return(getPagination(page.TotalCount, page.PageNumber, list));
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <returns></returns>
 public JsonResult loaduserbind(Entity.PageInfo page, int userid = 0)
 {
     using (var manage = new Data.CMSManage())
     {
         var list = manage.getUserBindList(page, userid).ToList();
         return(getPagination(page.TotalCount, page.PageNumber, list));
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <returns></returns>
 public JsonResult loadjson(Entity.PageInfo page, string channel, int itemid = 0)
 {
     using (var manage = new Data.CMSManage())
     {
         var list = manage.getDetailList(page, channel, itemid, 0, -1, -1, false);
         return(getPagination(page.TotalCount, page.PageNumber, list));
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <returns></returns>
 public JsonResult loadjson(Entity.PageInfo page)
 {
     using (var manage = new Data.CMSManage())
     {
         var list = manage.getScoreEventList(page, -1);
         return(getPagination(page.TotalCount, page.PageNumber, list));
     }
 }
Exemplo n.º 8
0
 public JsonResult getUserReviewList(Entity.PageInfo page, string code, int detailid, int replyid = 0, int userid = 0)
 {
     using (var manage = new bitcms.Data.CMSManage())
     {
         var list = manage.getReviewList(page, code, detailid, replyid, userid, 1);
         return(this.getResult(manage.Error, manage.Message, list));
     }
 }
Exemplo n.º 9
0
 public JsonResult getDetailPageList(Entity.PageInfo page, string code, int itemid, int userid = -1)
 {
     using (var manage = new Data.CMSManage())
     {
         var info = manage.getDetailList(page, code, itemid, userid);
         return(this.getResult(manage.Error, manage.Message, info));
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <returns></returns>
 public JsonResult loadscorelog(Entity.PageInfo page, int userid = 0)
 {
     using (var manage = new Data.CMSManage())
     {
         var list = manage.getScoreLogList(page, userid);
         return(getPagination(page.TotalCount, page.PageNumber, list));
     }
 }