public static DbQueryResult GetHomeProduct(MemberInfo member, ProductQuery query) { /* * DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(); * if ((currentDistributors != null) && (currentDistributors.UserId != 0)) * { * return new HomeProductDao().GetHomeProductsEx(member, query, true); * } * return new HomeProductDao().GetHomeProductsEx(member, query, false); */ return(new HomeProductDao().GetHomeProductsEx(member, query, DistributorsBrower.GetCurrStoreProductRange())); }
public static DataTable GetProducts(MemberInfo member, int?topicId, int BrandId, int?categoryId, string keyWord, int pageNumber, int maxNum, out int total, string sort, string order, string swr = "", int rangeType = 0, int storeid = 0) { ProductInfo.ProductRanage productRanage = new ProductInfo.ProductRanage(); //if (!Hidistro.ControlPanel.Config.CustomConfigHelper.Instance.AnonymousOrder) productRanage = DistributorsBrower.GetCurrStoreProductRange(); /* * else//如果匿名点餐功能开启,则获取所有商品 * productRanage = ProductInfo.ProductRanage.All; */ return(new ProductBrowseDao().GetProductsRange(member, topicId, BrandId, categoryId, Globals.GetCurrentDistributorId(), keyWord, pageNumber, maxNum, out total, sort, order == "asc", productRanage, swr, rangeType, storeid)); }
/// <summary> /// 产品Top显示 新增重载,根据产品id筛选 /// </summary> public static DataTable GetHomeProductTop(string top, ProductInfo.ProductTop productTop, int CategoryId) { DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(); if (productTop == ProductInfo.ProductTop.MostLike) //如果是猜你喜欢的产品 { MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (currentMember != null) { DataTable favPros = ProductBrowser.GetFavorites(currentMember); if (favPros.Rows.Count > 0) { return(favPros); } } } return(new HomeProductDao().GetHomeProductTop(top, productTop, DistributorsBrower.GetCurrStoreProductRange(), CategoryId)); }