コード例 #1
0
        // CONVERT WEB AUCTION TO SERVICE AUCTION
        public WebAuction ConvertFromServiceAuction(proxyRef.Auction sAuction)
        {
            WebAuction foundClientAuction = null;

            if (sAuction != null)
            {
                foundClientAuction = new WebAuction {
                    AuctionId          = sAuction.AuctionId,
                    TimeLeft           = sAuction.TimeLeft,
                    Payment            = sAuction.Payment,
                    Result             = sAuction.Result,
                    PaymentDate        = sAuction.PaymentDate,
                    ProductName        = sAuction.ProductName,
                    ProductDescription = sAuction.ProductDescription,
                };
            }
            return(foundClientAuction);
        }
コード例 #2
0
        // CONVERT WEB MODEL AUCTION TO SERVICE AUCTION
        public proxyRef.Auction ConvertToServiceAuction(WebAuction webAuction)
        {
            proxyRef.Auction proxyWebAuction = null;
            if (webAuction != null)
            {
                proxyWebAuction = new proxyRef.Auction
                {
                    AuctionId          = webAuction.AuctionId,
                    TimeLeft           = webAuction.TimeLeft,
                    Payment            = webAuction.Payment,
                    Result             = webAuction.Result,
                    PaymentDate        = webAuction.PaymentDate,
                    ProductName        = webAuction.ProductName,
                    ProductDescription = webAuction.ProductDescription,
                };
            }

            return(proxyWebAuction);
        }