Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
        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);
            }
        }
        public CollectionWithSQL FindHighBids(string auctionId)
        {
            CollectionWithSQL cwsq = GetTransactionalAuctionService().FindHighBids(auctionId);

            return(cwsq);
        }
        public CollectionWithSQL FindAllAuctions()
        {
            CollectionWithSQL cwsq = GetTransactionalAuctionService().FindAllAuctions();

            return(cwsq);
        }
        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);
            }
        }