public List <Auction> GetAllAuctions(string title_like = "")

        {
            if (title_like == "")
            {
                return(dao.List());
            }
            else
            {
                return(dao.SearchByTitle(title_like));
            }
        }
Exemple #2
0
        public List <Auction> ListAllAuctions(string title_like = "", double currentBid_lte = 0)
        {
            List <Auction> auctions = new List <Auction>();

            if (title_like != "" && currentBid_lte != 0)
            {
                auctions = dao.SearchByTitleAndPrice(title_like, currentBid_lte);
            }
            else if (title_like != "")
            {
                auctions = dao.SearchByTitle(title_like);
            }
            else if (currentBid_lte != 0)
            {
                auctions = dao.SearchByPrice(currentBid_lte);
            }
            else
            {
                auctions = dao.List();
            }
            return(auctions);
        }
        public List <Auction> List(string title_like = "", double currentBid_lte = 0)
        {
            if (title_like != "")
            {
                return(_dao.SearchByTitle(title_like));
            }
            if (currentBid_lte > 0)
            {
                return(_dao.SearchByPrice(currentBid_lte));
            }

            return(_dao.List());
        }
Exemple #4
0
        public List <Auction> List(string title_like = "", double currentBid_lte = 0D)
        {
            if (!string.IsNullOrEmpty(title_like))
            {
                return(_dao.SearchByTitle(title_like));
            }

            if (title_like == "" && currentBid_lte > 0)
            {
                return(_dao.SearchByPrice(currentBid_lte));
            }
            return(_dao.List());
        }
Exemple #5
0
 public List <Auction> GetAuctions(string title_like = "", double currentBid_lte = 0)
 {
     if (title_like != "" && currentBid_lte != 0)
     {
         return(dao.SearchByTitleAndPrice(title_like, currentBid_lte));
     }
     else if (title_like != "")
     {
         return(dao.SearchByTitle(title_like));
     }
     else if (currentBid_lte != 0)
     {
         return(dao.SearchByPrice(currentBid_lte));
     }
     return(dao.List());
 }
Exemple #6
0
        public List<Auction> ListAuctions(string title_like = "", double currentBid_lte = 0)
        {
            List<Auction> auction = dao.SearchByTitle(title_like);
            List<Auction> matchPrices = dao.SearchByPrice(currentBid_lte);
            List<Auction> matches = dao.SearchByTitleAndPrice(title_like, currentBid_lte);

            if (title_like != null && currentBid_lte != 0)
            {
                return matches;
            }
            else if (title_like == null && currentBid_lte != 0)
            {
                return matchPrices;
            }
            else if (title_like != null && currentBid_lte == 0)
            {
                return auction;
            }
            else
            {
                return dao.List();
            }

        }