예제 #1
0
 internal void CopyValuesFrom(BiddingSequence seq)
 {
     this.Id = seq.Id;
     this.Answer = seq.Answer;
     this.Sequence = seq.Sequence;
     this.CreationDate = seq.CreationDate;
 }
예제 #2
0
파일: Bid.cs 프로젝트: igiel/BridgeLesson
 public Bid(string bidSymbol, string bidSequence, BiddingSequence biddingSequence = null)
 {
     this.BidSymbol = bidSymbol;
     this.BidSequence = bidSequence;
     this.OriginalObject = biddingSequence ?? new BiddingSequence { Sequence = bidSequence, Id = 0 };
     this.NextBids = new List<Bid>();
 }
예제 #3
0
 internal void CopyValuesFrom(BiddingSequence seq)
 {
     this.Id           = seq.Id;
     this.Answer       = seq.Answer;
     this.Sequence     = seq.Sequence;
     this.CreationDate = seq.CreationDate;
 }
예제 #4
0
        public BiddingSystemSequence AddBiddingSequence(BiddingSequence biddingSequence)
        {
            if (this.BiddingSystemSequences == null)
                this.BiddingSystemSequences = new List<BiddingSystemSequence>();

            var biddingSystemSequence = new BiddingSystemSequence(this, biddingSequence);
            this.BiddingSystemSequences.Add(biddingSystemSequence);
            return biddingSystemSequence;
        }
예제 #5
0
        public BiddingSystemSequence AddBiddingSequence(BiddingSequence biddingSequence)
        {
            if (this.BiddingSystemSequences == null)
            {
                this.BiddingSystemSequences = new List <BiddingSystemSequence>();
            }

            var biddingSystemSequence = new BiddingSystemSequence(this, biddingSequence);

            this.BiddingSystemSequences.Add(biddingSystemSequence);
            return(biddingSystemSequence);
        }
예제 #6
0
        public BiddingSequence CreateOrUpdateBiddingSequence(BiddingSequence biddingSequence)
        {
            if(biddingSequence.Id>0)
            {
                var biddingSequenceProxy = db.BiddingSequences.Find(biddingSequence.Id);
                biddingSequenceProxy.CopyValuesFrom(biddingSequence);
            }
            else
                db.BiddingSequences.Add(biddingSequence);

            db.SaveChanges();
            return biddingSequence;
        }
예제 #7
0
 public BiddingSystemSequence(BiddingSystem biddingSystem, BiddingSequence biddingSequence)
 {
     this.BiddingSystem = biddingSystem;
     this.BiddingSequence = biddingSequence;
 }
예제 #8
0
 public BiddingSystemSequence(BiddingSystem biddingSystem, BiddingSequence biddingSequence)
 {
     this.BiddingSystem   = biddingSystem;
     this.BiddingSequence = biddingSequence;
 }