Ejemplo n.º 1
0
 public IList <Bid> GetAllEarnedBids()
 {
     try
     {
         return(BidController.Instance().GetAllEarnedBids());
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
Ejemplo n.º 2
0
 public bool IsBidWon(Bid bid)
 {
     try
     {
         return(BidController.Instance().IsBidWon(bid));
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
Ejemplo n.º 3
0
 public bool BidExpired(int productId)
 {
     try
     {
         return(BidController.Instance().BidExpired(productId));
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
Ejemplo n.º 4
0
        // TODO: fix all the return list methods (try to return list of bidDtos)

        public void MakeBid(int userId, int productId, int coins)
        {
            try
            {
                BidController.Instance().MakeBid(userId, productId, coins);
            }
            catch (Exception ex)
            {
                throw new FaultException(ex.Message);
            }
        }
Ejemplo n.º 5
0
 public bool SetWinnersForProducts()
 {
     try
     {
         return(BidController.Instance().SetWinnersForProducts());
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
Ejemplo n.º 6
0
        public IList <BidDto> GetAllBidsByProductId(int productId)
        {
            try
            {
                var bids = BidController.Instance().GetAllBidsByProductId(productId);

                return(TransferCollectionData(bids));
            }
            catch (Exception ex)
            {
                throw new FaultException(ex.Message);
            }
        }
Ejemplo n.º 7
0
        public BidDto GetBidById(int bidId)
        {
            try
            {
                var bidDb = BidController.Instance().GetBidByIdWithAllObjects(bidId);

                return(MapDbBidToBidDto(bidDb));
            }
            catch (Exception ex)
            {
                throw new FaultException(ex.Message);
            }
        }
Ejemplo n.º 8
0
 public bool CheckCoinsValid(int productId, double coins)
 {
     return(BidController.Instance().CheckCoinsValid(productId, coins));
 }