コード例 #1
0
        public CollectionWithSQL FindHighBids(String auctionId)
        {
            try {
                IList             bids   = persistentAuctions.FindHighBids(auctionId);
                CollectionWithSQL result = new CollectionWithSQL(
                    new ArrayList());
                foreach (IBid b in bids)
                {
                    result.TheCollection.Add(new BidInfo(b));
                }

                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                persistentAuctions.Close();

                result.TheSql = persistentAuctions.Sql;

                return(result);
            } catch (Exception e) {
                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                if (persistentAuctions != null)
                {
                    persistentAuctions.Close();
                }
                throw new AuctionServiceException(e);
            }
        }
コード例 #2
0
        public CollectionWithSQL FindAllAuctions()
        {
            try
            {
                IList             auctions = persistentAuctions.FindAllAuctions();
                CollectionWithSQL result   = new CollectionWithSQL(
                    new ArrayList());
                foreach (IAuction a in auctions)
                {
                    result.TheCollection.Add(persistentAuctions.CreateAuctionInfo(a, false));
                }

                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                persistentAuctions.Close();

                result.TheSql = persistentAuctions.Sql;
                return(result);
            }
            catch (Exception e)
            {
                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                if (persistentAuctions != null)
                {
                    persistentAuctions.Close();
                }
                throw new AuctionServiceException(e);
            }
        }
コード例 #3
0
        public CollectionWithSQL FindAllAuctions()
        {
            try
            {
                IList auctions = persistentAuctions.FindAllAuctions();
                CollectionWithSQL result = new CollectionWithSQL(
                    new ArrayList());
                foreach (IAuction a in auctions)
                    result.TheCollection.Add(persistentAuctions.CreateAuctionInfo(a,false));

                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                persistentAuctions.Close();

                result.TheSql = persistentAuctions.Sql ;
                return result;
            }
            catch (Exception e)
            {
                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                if (persistentAuctions!=null) persistentAuctions.Close();
                throw new AuctionServiceException(e);
            }
        }
コード例 #4
0
        public CollectionWithSQL FindHighBids(string auctionId)
        {
            CollectionWithSQL cwsq = GetTransactionalAuctionService().FindHighBids(auctionId);

            return(cwsq);
        }
コード例 #5
0
        public CollectionWithSQL FindAllAuctions()
        {
            CollectionWithSQL cwsq = GetTransactionalAuctionService().FindAllAuctions();

            return(cwsq);
        }
コード例 #6
0
        public CollectionWithSQL FindHighBids(String auctionId)
        {
            try {
                IList bids = persistentAuctions.FindHighBids(auctionId);
                CollectionWithSQL result = new CollectionWithSQL(
                        new ArrayList());
                foreach (IBid b in bids)
                    result.TheCollection.Add(new BidInfo(b));

                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                persistentAuctions.Close();

                result.TheSql = persistentAuctions.Sql ;

                return result;
            } catch (Exception e) {
                // The next operation is for Object-Relational mapping software that needs to be explicitly cleaned up.
                // Those that do not simply ignore this operation.
                if (persistentAuctions!=null) persistentAuctions.Close();
                throw new AuctionServiceException(e);
            }
        }