예제 #1
0
 public JsonResult SearchGoodsList(string userId, string entId, string searchValue, string letter, string tags, string isKc, string CategoryId, string Login_Id, int pageIndex, int pageSize)
 {
     try
     {
         if (string.IsNullOrEmpty(entId))
         {
             entId = BaseConfiguration.EntId;
         }
         ///获取商品分类列表
         ///
         ////获取当前商品分类
         List <Category> clist = new List <Category>();
         if (CategoryId != "")
         {
             ImgInfoDal idal = new ImgInfoDal();
             clist = idal.GetCategory(CategoryId, entId);
         }
         ///商品信息
         GoodsInfoDal     dal  = new GoodsInfoDal();
         List <GoodsList> list = dal.GetGoodsList(userId, Server.UrlDecode(searchValue.Trim()), letter, tags, isKc, CategoryId, Login_Id, pageIndex, pageSize, entId);
         ///商品分类信息
         return(Json(new { success = true, list, clist }));
     }
     catch (Exception ex)
     {
         LogQueue.Write(LogType.Error, "Search/SearchGoodsList", ex.Message.ToString());
         return(Json(new { success = false, message = "商品列表加载失败!" }));
     }
 }
예제 #2
0
 /// <summary>
 /// 专区商品
 /// </summary>
 /// <param name="entId">机构Id</param>
 /// <param name="userId">会员Id</param>
 /// <param name="zqType">专区类型</param>
 /// <param name="pageIndex">页码</param>
 /// <param name="pageSize">页容</param>
 /// <returns></returns>
 public JsonResult GetZqGoodsList(string entId, string userId, string zqType, int pageIndex, int pageSize)
 {
     try
     {
         if (string.IsNullOrEmpty(entId))
         {
             entId = BaseConfiguration.EntId;
         }
         if (string.IsNullOrEmpty(zqType))
         {
             return(Json(new { success = false, msgCode = "E002", message = "专区类型获取失败" }));
         }
         ///获取商品分类列表
         GoodsInfoDal     dal  = new GoodsInfoDal();
         List <GoodsList> list = dal.GetGoodsList(userId, "", "", "cxbs", "", "", "", pageIndex, pageSize, entId, zqType);
         ///商品分类信息
         return(Json(new { success = true, list }));
     }
     catch (Exception ex)
     {
         LogQueue.Write(LogType.Error, "Search/SearchGoodsList", ex.Message.ToString());
         return(Json(new { success = false, message = "商品列表加载失败!" }));
     }
 }