/// <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); }
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); }
public List <CategoriesDTO> GetCategoriesList() { return(categoriesDAO.GetAll()); }