Пример #1
0
        /// <summary>
        /// Performs one "Select * from MyTable where MyColumn=MyFilter".
        /// </summary>
        /// <returns>List of found records.</returns>
        public virtual List <CategoriesInfo> GetAll(List <DataFilterExpressionDB> filterExpression)
        {
            motor.OpenConnection();
            List <CategoriesInfo> list = CategoriesDAO.GetAll(filterExpression);

            if (this.closeConnectionWhenFinish)
            {
                motor.CloseConnection();
            }
            return(list);
        }
Пример #2
0
        public List <ProductDTO> GetProductList()
        {
            CategoriesDAO        cateDAO  = new CategoriesDAO();
            List <CategoriesDTO> listCate = cateDAO.GetAll();
            List <ProductDTO>    list     = productDAO.GetAll();

            foreach (CategoriesDTO cateDto in listCate)
            {
                foreach (ProductDTO dto in list)
                {
                    if (dto.cateId == cateDto.cateId)
                    {
                        dto.cateName = cateDto.cateName;
                    }
                }
            }
            return(list);
        }
Пример #3
0
 public List <CategoriesDTO> GetCategoriesList()
 {
     return(categoriesDAO.GetAll());
 }