Ejemplo n.º 1
0
        /// <summary>
        /// 获取购物车列表
        /// </summary>
        public static List <ProductDetail> GetShoppingCart(EnumDocType ordertype, string guid, string userid)
        {
            DataTable            dt   = ShoppingCartDAL.GetShoppingCart((int)ordertype, guid, userid);
            List <ProductDetail> list = new List <ProductDetail>();

            foreach (DataRow dr in dt.Rows)
            {
                ProductDetail model = new ProductDetail();
                model.FillData(dr);
                list.Add(model);
            }
            return(list);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取购物车列表
        /// </summary>
        public static List <ProductDetail> GetShoppingCart(EnumDocType ordertype, string guid, string userid)
        {
            DataTable            dt   = ShoppingCartDAL.GetShoppingCart((int)ordertype, guid, userid);
            List <ProductDetail> list = new List <ProductDetail>();

            foreach (DataRow dr in dt.Rows)
            {
                ProductDetail model = new ProductDetail();
                model.FillData(dr);
                if (!string.IsNullOrEmpty(model.UnitID))
                {
                    model.UnitName = new ProductsBusiness().GetUnitByID(model.UnitID).UnitName;
                }
                list.Add(model);
            }
            return(list);
        }