Пример #1
0
        public void ReplaceBet(AnotherBet anotherBet)
        {
            Bet normalBet = this.ConvertToNormalBet(anotherBet);

            if (anotherBet.AnotherBetNumber == EAnotherBetNumber.One)
            {
                normalBet.BetType = this.OneBet.BetType;
                this.K1           = anotherBet.K;
                this.OneBet       = normalBet;
            }
            else
            {
                normalBet.BetType = this.TwoBet.BetType;
                this.K2           = anotherBet.K;
                this.TwoBet       = normalBet;
            }
            ++this.Id;
        }
Пример #2
0
        private Bet ConvertToNormalBet(AnotherBet bet)
        {
            Bet bet1 = new Bet()
            {
                Coef       = bet.Coef,
                Bookmaker  = bet.Bookmaker,
                EvId       = bet.EvId,
                OtherData  = bet.OtherData,
                BetValue   = bet.BetValue,
                Direction  = bet.Direction,
                ForksCount = 0,
                MatchData  = " (" + bet.League + ") " + bet.GetClearScore()
            };

            bet1.Direction = bet.Direction;
            bet1.Parametr  = bet.Parametr;
            bet1.Team      = bet.Teams;
            bet1.Url       = bet.Url;
            return(bet1);
        }