public string Place2Bids(String auctionId1, String auctionId2, String bidId1, String bidId2, String userId, System.Double amount1, System.Double amount2, System.Double maxAmount1, System.Double maxAmount2) { string sql = ""; try { IUser user = persistentAuctions.GetUser(userId); IAuction auction1 = persistentAuctions.GetAuction(auctionId1); IBid newBid1 = persistentAuctions.CreateBid(bidId1, auction1, user, amount1, maxAmount1); IAuction auction2 = persistentAuctions.GetAuction(auctionId2); IBid newBid2 = persistentAuctions.CreateBid(bidId2, auction2, user, amount2, maxAmount2); // 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(); sql = persistentAuctions.Sql; } 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); } return(sql); }
public Bid(IBid bid) : base(bid) { if (Value == null) { Value = new Value(); } }
public BaseBid(IBid bid) { StringId = bid.StringId; Date = bid.Date; Status = bid.Status; Value = bid.Value; ParticipationUrl = bid.ParticipationUrl; }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.Bid == null)) { IBid bidCasted = item.As <IBid>(); if ((bidCasted != null)) { this._parent.Bid = bidCasted; return; } } }
public BidInfo(IBid b) { if (b != null) { this.bidAmount = b.Amount; this.maxBidAmount = b.MaxAmount; IUser u = b.Buyer; if (u != null) { buyer = u.Id; } } }
public BidInfo(IBid b) { if (b!=null) { this.bidAmount = b.Amount; this.maxBidAmount = b.MaxAmount; IUser u = b.Buyer; if (u!=null) { buyer = u.Id; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.Bid == null)) { IBid bidCasted = item.As <IBid>(); if ((bidCasted != null)) { this._parent.Bid = bidCasted; return; } } if ((this._parent.ProductBidClearing == null)) { IProductBidClearing productBidClearingCasted = item.As <IProductBidClearing>(); if ((productBidClearingCasted != null)) { this._parent.ProductBidClearing = productBidClearingCasted; return; } } if ((this._parent.BidPriceCurve == null)) { IBidPriceCurve bidPriceCurveCasted = item.As <IBidPriceCurve>(); if ((bidPriceCurveCasted != null)) { this._parent.BidPriceCurve = bidPriceCurveCasted; return; } } if ((this._parent.MarketProduct == null)) { IMarketProduct marketProductCasted = item.As <IMarketProduct>(); if ((marketProductCasted != null)) { this._parent.MarketProduct = marketProductCasted; return; } } }
public BidInfo CreateBidInfo(IBid bid) { return new BidInfo(bid); }
public BidListController() { this.repo = new BidRepository(); this.BidListRepo = new BidRepository(); }
public BidDTO(IBid bid) : base(bid) { }
public BidInfo CreateBidInfo(IBid bid) { return(new BidInfo(bid)); }