public void UpdateAuction(clientRef.Auction auctionToUpdate) { proxyRef.Auction auctionInServiceFormat = new ConvertDataAuction().ConvertToServiceAuction(auctionToUpdate); using (proxyRef.AuctionServiceClient auctionProxy = new proxyRef.AuctionServiceClient()) { auctionProxy.UpdateAuction(auctionInServiceFormat); } }
public List <clientRef.Auction> GetAuctionAll() { proxyRef.AuctionServiceClient asc = new proxyRef.AuctionServiceClient(); var auctions = asc.GetAuctionAll(); List <clientRef.Auction> foundAuctionsList = GetClientSideAuctions(auctions); return(foundAuctionsList); }
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); }
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); }
public void DeleteAuction(int auctionId) { proxyRef.AuctionServiceClient auctionProxy = new proxyRef.AuctionServiceClient(); auctionProxy.DeleteAuction(auctionId); }