示例#1
0
        /// <summary>
        /// return list of all products
        /// </summary>
        /// <returns></returns>
        public IList <IProductDTO> GetAllProducts()
        {
            var config = new MapperConfiguration(cfg => cfg.CreateMap <IProduct, IProductDTO>());
            var mapper = config.CreateMapper();

            return(mapper.Map <IList <IProductDTO> >(_productDataAccess.GetProducts()));
        }
示例#2
0
        public Dictionary <string, double> GetProducts()
        {
            Dictionary <string, double> products = _productDataAccess.GetProducts();

            foreach (var namePrice in products)
            {
                products[namePrice.Key] = CalculateSellPrice(namePrice.Value);
            }

            return(products);
        }
示例#3
0
 /// <summary>
 /// Get all products in the data source
 /// </summary>
 /// <returns>Products</returns>
 public IEnumerable <Product> GetProducts()
 {
     return(productDataAccess.GetProducts());
 }
示例#4
0
 public List <ProductInfo> GetProducts(string sqlWhere)
 {
     return(productDataAccess.GetProducts(sqlWhere));
 }
示例#5
0
 public void LoadProducts()
 {
     this.grid_PetShopDB.DataSource = _productRepo.GetProducts();
 }
示例#6
0
 public List <ProductInfo> GetProducts(int pageSize, int pageIndex, string strWhere)
 {
     return(_dataAccess.GetProducts(pageSize, pageIndex, strWhere));
 }
示例#7
0
 public IList <ProductModel> GetProducts()
 {
     return(productDataAccess.GetProducts());
 }
示例#8
0
 public List <Product> GetProducts()
 {
     return(_productData.GetProducts());
 }
示例#9
0
 public PagedList <ProductModel> GetProducts(int pageIndex, int pageSize)
 {
     return(productDataAccess.GetProducts(pageIndex, pageSize));
 }