예제 #1
0
 public IList <Bid> GetAllEarnedBids()
 {
     try
     {
         return(BidController.Instance().GetAllEarnedBids());
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
예제 #2
0
 public bool IsBidWon(Bid bid)
 {
     try
     {
         return(BidController.Instance().IsBidWon(bid));
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
예제 #3
0
 public bool BidExpired(int productId)
 {
     try
     {
         return(BidController.Instance().BidExpired(productId));
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
예제 #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);
            }
        }
예제 #5
0
 public bool SetWinnersForProducts()
 {
     try
     {
         return(BidController.Instance().SetWinnersForProducts());
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #8
0
 public bool CheckCoinsValid(int productId, double coins)
 {
     return(BidController.Instance().CheckCoinsValid(productId, coins));
 }