Esempio n. 1
0
        public static List <BuyerShoppingCartViewModel> GetBuyerShoppingCartViewModels(int buyerId, out string msg)
        {
            string sql = "select c.*,s.CompanyName as SellerName,p.ProductFullName as ProductName,p.ProductUnit as ProductUnit,p.Price1 as Price from BuyerShoppingCart c ,SellerInfo s,ProductInfo p where c.SellerId=s.SellerId and c.ProductId =p.ProductId and c.BuyerId =" + buyerId;

            return(BaseBll <BuyerShoppingCartViewModel> .GetList(sql, GetConnectionString(buyerId), out msg).ToList());
        }
Esempio n. 2
0
        /// <summary>
        /// 返回指定买家关联卖家的Id列表
        /// xieguanheng@2016-12-29
        /// </summary>
        /// <param name="buyerId"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public static List <SellerInfo> GetSellerList(int buyerId, out string errMsg)
        {
            var sql = string.Format("Select a.* From [SellerInfo] a,  [SellerCustomerInfo] b    Where a.SellerId=b.SellerId and [BuyerId]={0}", buyerId);

            return(BaseBll <SellerInfo> .GetList(sql, GetConnectionString(buyerId), out errMsg));
        }