Exemple #1
0
 public void UpdateAuction(clientRef.Auction auctionToUpdate)
 {
     proxyRef.Auction auctionInServiceFormat = new ConvertDataAuction().ConvertToServiceAuction(auctionToUpdate);
     using (proxyRef.AuctionServiceClient auctionProxy = new proxyRef.AuctionServiceClient()) {
         auctionProxy.UpdateAuction(auctionInServiceFormat);
     }
 }
Exemple #2
0
        public List <clientRef.Auction> GetAuctionAll()
        {
            proxyRef.AuctionServiceClient asc = new proxyRef.AuctionServiceClient();
            var auctions = asc.GetAuctionAll();

            List <clientRef.Auction> foundAuctionsList = GetClientSideAuctions(auctions);

            return(foundAuctionsList);
        }
Exemple #3
0
        public bool AddAuction(clientRef.Auction auctionToAdd)
        {
            bool allOk = false;

            proxyRef.Auction auctionInServiceFormat = new ConvertDataAuction().ConvertToServiceAuction(auctionToAdd);
            using (proxyRef.AuctionServiceClient auctionProxy = new proxyRef.AuctionServiceClient()) {
                allOk = auctionProxy.AddAuction(auctionInServiceFormat);
            }
            return(allOk);
        }
Exemple #4
0
        public clientRef.Auction GetAuctionById(int findAuctionId)
        {
            clientRef.Auction clientAuction = null;
            proxyRef.Auction  aProxyAuction = null;
            using (proxyRef.AuctionServiceClient auctionProxy = new proxyRef.AuctionServiceClient())
            {
                aProxyAuction = auctionProxy.GetAuctionById(findAuctionId);
            }
            if (aProxyAuction != null)
            {
                clientAuction = new ConvertDataAuction().ConvertFromServiceAuction(aProxyAuction);
            }

            return(clientAuction);
        }
Exemple #5
0
 public void DeleteAuction(int auctionId)
 {
     proxyRef.AuctionServiceClient auctionProxy = new proxyRef.AuctionServiceClient();
     auctionProxy.DeleteAuction(auctionId);
 }