Exemple #1
0
        public static void UpdateSystemOrCombiticket(Ticket ticketToCalculate)
        {
            lock (locker)
            {
                if (ticketToCalculate == null)
                {
                    ticketToCalculate = ChangeTracker.NewTicket;
                }

                List <TipItemVw> localTipItems = new List <TipItemVw>();
                localTipItems = ticketToCalculate.TipItems.Where(x => x.IsChecked).ToList();

                decimal oddVal         = 1;
                decimal multiWayOddVal = 1;
                int?    minCombMax     = 0;
                int     bonusTipsCount = 0;

                Dictionary <int, List <TipItemVw> > tipItemDict = new Dictionary <int, List <TipItemVw> >();
                foreach (TipItemVw t in localTipItems)
                {
                    int iSvrMatchId = (int)t.Match.MatchId;

                    if (tipItemDict.ContainsKey(iSvrMatchId))
                    {
                        tipItemDict[iSvrMatchId].Add(t);
                    }
                    else
                    {
                        List <TipItemVw> list = new List <TipItemVw>();
                        list.Add(t);
                        tipItemDict.Add(iSvrMatchId, list);
                    }
                }
                // de: Anzahl der Wege berechnen                // en: Number of ways to calculate
                // de: h?chste Quote der Mehrwege finden        // en: highest rate of multipath are
                //
                int pathCount    = 0;
                int rowCount     = 1;
                int singlesCount = 0;
                foreach (List <TipItemVw> list in tipItemDict.Values)
                {
                    if (list.Count >= 1)
                    {
                        decimal maxOdd = 1;
                        foreach (TipItemVw tip in list)
                        {
                            if (maxOdd < tip.Odd.Value.Value)
                            {
                                maxOdd = tip.Odd.Value.Value;
                            }
                        }
                        TipItemVw t = list[0];
                        if (t.IsBank || list.Count > 1)
                        {
                            pathCount++;
                            rowCount       *= list.Count;
                            multiWayOddVal *= maxOdd;
                        }
                        else
                        {
                            oddVal *= maxOdd;
                            singlesCount++;
                        }
                        int?curCombMax = minCombinationOfAll(t);
                        if (curCombMax > minCombMax)
                        {
                            minCombMax = curCombMax;
                        }
                        if (list.Count == 1 && ticketToCalculate.TicketState == TicketStates.Multy)
                        {
                            if (t.Odd.Value.Value >= BonusFromOdd)
                            {
                                //Bonus gibt es nicht bei Mehrwegen
                                bonusTipsCount++;
                            }
                        }
                    }
                }

                TipListInfo.MinCombination           = minCombMax;
                TipListInfo.NumOfTipps               = tipItemDict.Count;
                TipListInfo.PathCount                = pathCount;
                TipListInfo.RowCount                 = rowCount;
                TipListInfo.MultiWayOddFactor        = multiWayOddVal;
                TipListInfo.CurrentTicketPossibleWin = 0;
                TipListInfo.FullOddFactor            = 0;

                TipListInfo.ManipulationFeePercentage = StationRepository.GetManipulationFeePercentage(ticketToCalculate);
                TipListInfo.BonusFactor = StationRepository.GetBonusValueForBets(ticketToCalculate) / 100 + 1;

                switch (ticketToCalculate.TicketState)
                {
                default:
                    if (localTipItems.Count > 1 && ticketToCalculate.TicketState != TicketStates.MultySingles)
                    {
                        ticketToCalculate.TicketState = TicketStates.Multy;
                        UpdateSystemOrCombiticket(ticketToCalculate);
                        return;
                    }
                    foreach (var tipItem in localTipItems)
                    {
                        tipItem.IsBank = false;
                    }
                    if (localTipItems.Count == 1 && ticketToCalculate.TicketState != TicketStates.MultySingles)
                    {
                        UpdateSingleticketItems(localTipItems, ticketToCalculate);
                    }
                    if (localTipItems.Count == 0)
                    {
                        TipListInfo.MinBet     = 0;
                        TipListInfo.OddOfTipps = 0;
                        TipListInfo.MaxBet     = 0;
                        TipListInfo.MinWin     = 0;
                        TipListInfo.MaxWin     = 0;
                        TipListInfo.ManipulationFeePercentage = 0;
                        TipListInfo.ResetNumXY();
                    }
                    break;

                case TicketStates.MultySingles:
                    return;

                case TicketStates.Multy:
                    //rowCount = 1;
                    TipListInfo.ResetNumXY();
                    if (localTipItems.Count < 2)
                    {
                        ticketToCalculate.TicketState = TicketStates.Single;
                        UpdateSystemOrCombiticket(ticketToCalculate);
                        return;
                    }
                    //TipListInfo.FullOddFactor = oddVal * multiWayOddVal * TipListInfo.BonusFactor;
                    TipListInfo.FullOddFactor = oddVal * multiWayOddVal;
                    if (TipListInfo.FullOddFactor >= MaxOdd)
                    {
                        TipListInfo.IsMaxOddBet = true;
                        if (TipListInfo.FullOddFactor > MaxOdd)
                        {
                            TipListInfo.IllegalOddFactor     = TipListInfo.FullOddFactor;
                            ticketToCalculate.MaxOddExceeded = true;
                        }
                        TipListInfo.FullOddFactor = MaxOdd;
                        TipListInfo.OddOfTipps    = MaxOdd;
                    }
                    else
                    {
                        TipListInfo.OddOfTipps           = oddVal * multiWayOddVal;
                        TipListInfo.IllegalOddFactor     = 0;
                        TipListInfo.IsMaxOddBet          = false;
                        ticketToCalculate.MaxOddExceeded = false;
                    }
                    foreach (var tipItem in localTipItems)
                    {
                        tipItem.IsBank = false;
                    }
                    TipListInfo.MinBet = MinStakeCombiBet;
                    TipListInfo.MaxBet = StationRepository.GetMaxStakeCombi(ticketToCalculate);

                    TipListInfo.MinWin = TipListInfo.FullOddFactor * TipListInfo.MinBet / rowCount * (100 - TipListInfo.ManipulationFeePercentage) / 100;

                    var manipulationFee = (TipListInfo.MaxBet / rowCount * TipListInfo.ManipulationFeePercentage) / 100;
                    //TipListInfo.MaxWin = ((TipListInfo.MaxBet / rowCount - manipulationFee) * TipListInfo.FullOddFactor * TipListInfo.BonusFactor) - TipListInfo.MaxBet / rowCount;
                    //TipListInfo.MaxWin *= rowCount;
                    TipListInfo.MaxWin = (((TipListInfo.MaxBet - manipulationFee) / rowCount) * TipListInfo.FullOddFactor * TipListInfo.BonusFactor) - TipListInfo.MaxBet;

                    var maxWinMultiBetFromAdmin = StationRepository.GetMaxWinMultiBet(ticketToCalculate);
                    if (maxWinMultiBetFromAdmin > 0 && TipListInfo.MaxWin > maxWinMultiBetFromAdmin)
                    {
                        var a0 = 100 * maxWinMultiBetFromAdmin * rowCount;
                        var a1 = (100 - TipListInfo.ManipulationFeePercentage);
                        var a2 = (a1 * TipListInfo.BonusFactor * TipListInfo.FullOddFactor);

                        var varX = (a0) / (a2 - 100 * rowCount);

                        TipListInfo.MaxBet = Round(varX, 2);
                        //manipulationFee = (TipListInfo.MaxBet / rowCount * TipListInfo.ManipulationFeePercentage) / 100;
                    }

                    //var posWin = TipListInfo.FullOddFactor * TipListInfo.Bet / rowCount;
                    //TipListInfo.CurrentTicketPossibleWin = posWin * ((100 - TipListInfo.ManipulationFeePercentage) / 100) * TipListInfo.BonusFactor;

                    var pw1 = (TipListInfo.Bet - (TipListInfo.Bet * TipListInfo.ManipulationFeePercentage / 100)) * TipListInfo.BonusFactor * TipListInfo.FullOddFactor;
                    TipListInfo.CurrentTicketPossibleWin = pw1 / rowCount;

                    //TipListInfo.MaxWin = (TipListInfo.MaxBet - manipulationFee) * TipListInfo.FullOddFactor * TipListInfo.BonusFactor / rowCount;
                    TipListInfo.MaxWin        = ((TipListInfo.MaxBet - (TipListInfo.MaxBet * TipListInfo.ManipulationFeePercentage / 100)) * TipListInfo.BonusFactor * TipListInfo.FullOddFactor) / rowCount;
                    TipListInfo.FullOddFactor = TipListInfo.FullOddFactor;
                    break;

                case TicketStates.System:
                    TipListInfo.SystemX          = ticketToCalculate.SystemX;
                    TipListInfo.IllegalOddFactor = 0;

                    int ind = 0;
                    if (!LimitHandling.SystemBetYAllowed(TipListInfo.SystemY))
                    {
                        //avoid useless time and memory consuming calculations
                        TipListInfo.MinBet     = 0;
                        TipListInfo.OddOfTipps = 0;
                        TipListInfo.MaxBet     = 0;
                        TipListInfo.MinWin     = 0;
                        TipListInfo.MaxWin     = 0;
                        TipListInfo.ManipulationFeePercentage = 0;
                        TipListInfo.ResetNumXY();
                        //UpdateSystemOrCombiticket(ticketToCalculate);
                        return;
                    }
                    if (TipListInfo.SystemX == 0)
                    {
                        TipListInfo.ResetNumXY();
                    }


                    decimal[] oddVals        = new decimal[TipListInfo.SystemY];
                    bool      disableBankBtn = TipListInfo.PathCount + TipListInfo.MinSystemY >= TipListInfo.NumOfTipps;
                    decimal   dBankTipValue  = 0;
                    foreach (TipItemVw t in localTipItems)
                    {
                        if (!t.IsBank && t.Odd != null)
                        {
                            if (ind < oddVals.Length)
                            {
                                oddVals[ind++] = t.Odd.Value.Value;
                            }
                            else
                            {
                            }


                            t.IsBankEnabled = !disableBankBtn;
                        }
                        else if (t.IsBank && t.Odd != null)
                        {
                            if (dBankTipValue == 0)
                            {
                                dBankTipValue = 1;     // to make multiplication possible;
                            }
                            dBankTipValue *= t.Odd.Value.Value;
                        }
                    }
                    RefreshBanks();

                    decimal maxOdd = OddUtilities.AllCombinationsSum(oddVals, TipListInfo.SystemX);     // TipListInfo.SystemX
                    if (maxOdd == 0)
                    {
                        ticketToCalculate.TicketState = TicketStates.Multy;
                        UpdateSystemOrCombiticket(ticketToCalculate);
                        return;
                    }

                    if (maxOdd * TipListInfo.MultiWayOddFactor > MaxOdd)
                    {
                        maxOdd = MaxOdd;
                        TipListInfo.MultiWayOddFactor    = 1;
                        ticketToCalculate.MaxOddExceeded = true;
                    }
                    else
                    {
                        ticketToCalculate.MaxOddExceeded = false;
                    }

                    if (oddVals.Length < TipListInfo.SystemX)
                    {
                        UpdateSystemOrCombiticket(ticketToCalculate);
                        return;
                    }

                    //ViewControl.SetTicketErrorMessage(TicketError.NoError);
                    TipListInfo.MinBet = MinStakeSystemBet;
                    //TipListInfo.MaxBet = StationSettings.Station.MaxStakeSystemBet;
                    TipListInfo.OddOfTipps = maxOdd;

                    decimal manFee = 0;
                    manFee = StationRepository.GetManipulationFeePercentage(ChangeTracker.NewTicket);
                    //TipListInfo.MaxBet = (100 * StationRepository.GetMaxWinSystemBet(ChangeTracker.NewTicket)) / ((100 - manFee) * TipListInfo.BonusFactor * (maxOdd * TipListInfo.MultiWayOddFactor / TipListInfo.RowCount));

                    TipListInfo.MaxBet = (100 * StationRepository.GetMaxWinSystemBet(ChangeTracker.NewTicket) * TipListInfo.RowCount) / ((100 - manFee) * TipListInfo.BonusFactor * (maxOdd * TipListInfo.MultiWayOddFactor));

                    TipListInfo.MaxBet = Round(Math.Min(TipListInfo.MaxBet, StationRepository.GetMaxStakeSystemBet(ChangeTracker.NewTicket)), 2);

                    TipListInfo.MinWin = TipListInfo.MinBet * maxOdd * TipListInfo.MultiWayOddFactor / TipListInfo.RowCount;
                    //TipListInfo.MaxWin = TipListInfo.MaxBet * maxOdd * TipListInfo.MultiWayOddFactor / TipListInfo.RowCount * TipListInfo.BonusFactor * (100 - TipListInfo.ManipulationFeePercentage) / 100;

                    TipListInfo.MaxWin = ((TipListInfo.MaxBet * (100 - TipListInfo.ManipulationFeePercentage) / 100) * TipListInfo.BonusFactor * maxOdd * TipListInfo.MultiWayOddFactor) / TipListInfo.RowCount;


                    /////////////////////////////////////////////
                    var maxWinSystemBetFromAdmin = StationRepository.GetMaxWinSystemBet(ticketToCalculate);
                    if (maxWinSystemBetFromAdmin > 0 && TipListInfo.MaxWin > maxWinSystemBetFromAdmin)
                    {
                        TipListInfo.MaxWin = maxWinSystemBetFromAdmin;
                        //manFee = StationRepository.GetManipulationFeePercentage(ChangeTracker.NewTicket);
                        //TipListInfo.MaxBet = (100 * TipListInfo.MaxWin) / ((100 - manFee) * TipListInfo.BonusFactor * (maxOdd * TipListInfo.MultiWayOddFactor / TipListInfo.RowCount));
                        TipListInfo.MaxBet = Round((100 * StationRepository.GetMaxWinSystemBet(ChangeTracker.NewTicket) * TipListInfo.RowCount) / ((100 - manFee) * TipListInfo.BonusFactor * (maxOdd * TipListInfo.MultiWayOddFactor)), 2);
                    }
                    /////////////////////////////////////////////

                    if (dBankTipValue > 0)
                    {
                        if (maxOdd * (multiWayOddVal / rowCount) > MaxOdd)
                        {
                            TipListInfo.FullOddFactor        = MaxOdd;
                            ticketToCalculate.MaxOddExceeded = true;
                        }
                        else
                        {
                            TipListInfo.FullOddFactor        = maxOdd * multiWayOddVal;
                            ticketToCalculate.MaxOddExceeded = false;
                        }
                    }
                    else
                    {
                        TipListInfo.FullOddFactor = maxOdd;
                    }
                    //TipListInfo.CurrentTicketPossibleWin = TipListInfo.Bet * maxOdd * TipListInfo.MultiWayOddFactor / TipListInfo.RowCount * TipListInfo.BonusFactor * (100 - TipListInfo.ManipulationFeePercentage) / 100;

                    TipListInfo.CurrentTicketPossibleWin = ((TipListInfo.Bet - ((TipListInfo.Bet * TipListInfo.ManipulationFeePercentage) / 100)) * TipListInfo.BonusFactor * maxOdd * TipListInfo.MultiWayOddFactor) / TipListInfo.RowCount;

                    TipListInfo.OddOfTipps = maxOdd;


                    break;
                }


                ticketToCalculate.NumberOfBets         = localTipItems.Count;
                ticketToCalculate.TotalOddDisplay      = TipListInfo.FullOddFactor;
                ticketToCalculate.ManipulationFeeValue = TipListInfo.ManipulationFeeValue;
                ticketToCalculate.MaxBet = TipListInfo.MaxBet;
                //ticketToCalculate.MaxBet = Math.Min(TipListInfo.MaxBet, StationRepository.GetMaxStake(ticketToCalculate));
                //ticketToCalculate.MaxBet = Math.Min(TipListInfo.MaxBet, TipListInfo.Bet);
                ticketToCalculate.MinBet                   = TipListInfo.MinBet;
                ticketToCalculate.BonusPercentage          = TipListInfo.BonusFactorPerc;
                ticketToCalculate.BonusValue               = TipListInfo.BonusValue / TipListInfo.RowCount;
                ticketToCalculate.MaxWin                   = TipListInfo.MaxWin;
                ticketToCalculate.RowCount                 = TipListInfo.RowCount;
                ticketToCalculate.StakeByRow               = ticketToCalculate.Stake / TipListInfo.RowCount;
                ticketToCalculate.CurrentTicketPossibleWin = TipListInfo.CurrentTicketPossibleWin;
                ticketToCalculate.SystemX                  = TipListInfo.SystemX;
                ticketToCalculate.SystemY                  = TipListInfo.SystemY;
                //ticketToCalculate.SystemButtonName = string.Format(TranslationProvider.Translate(MultistringTags.SYSTEM_FORMAT) as string, TipListInfo.SystemX, TipListInfo.SystemY, "+Banker");
            }
        }
Exemple #2
0
        /// <summary>
        /// Eintrag aus Ticket löschen
        /// </summary>
        /// <param name="p"></param>



        public static void UpdateSystemOrCombiticket(bool reset, TicketStates ticketState, ref TipListInfo tipListInfo, ObservableCollection <TipItem> tipItems)
        {
            decimal oddVal         = 1;
            decimal multiWayOddVal = 1;
            int     minCombMax     = 0;
            int     bonusTipsCount = 0;

            Dictionary <int, List <TipItem> > tipItemDict = new Dictionary <int, List <TipItem> >();

            foreach (TipItem t in tipItems)
            {
                int iSvrMatchId = (int)t.Match.SvrMatchID;

                if (tipItemDict.ContainsKey(iSvrMatchId))
                {
                    tipItemDict[iSvrMatchId].Add(t);
                }
                else
                {
                    List <TipItem> list = new List <TipItem>();
                    list.Add(t);
                    tipItemDict.Add(iSvrMatchId, list);
                }
            }
            // de: Anzahl der Wege berechnen                // en: Number of ways to calculate
            // de: höchste Quote der Mehrwege finden        // en: highest rate of multipath are
            //
            int pathCount = 0;
            int rowCount  = 1;

            foreach (List <TipItem> list in tipItemDict.Values)
            {
                if (list.Count >= 1)
                {
                    decimal maxOdd = 1;
                    foreach (TipItem tip in list)
                    {
                        if (maxOdd < tip.Odd.Value)
                        {
                            maxOdd = tip.Odd.Value;
                        }
                    }
                    TipItem t = list[0];
                    if (t.IsBank || list.Count > 1)
                    {
                        pathCount++;
                        rowCount       *= list.Count;
                        multiWayOddVal *= maxOdd;
                    }
                    else
                    {
                        oddVal *= maxOdd;
                    }
                    int curCombMax = minCombinationOfAll(t);
                    if (curCombMax > minCombMax)
                    {
                        minCombMax = curCombMax;
                    }
                    if (list.Count == 1 && ticketState == TicketStates.Combi)
                    {
                        if (t.Odd.Value >= BonusFromOdd)
                        {
                            //Bonus gibt es nicht bei Mehrwegen
                            bonusTipsCount++;
                        }
                    }
                }
            }

            tipListInfo.MinCombination    = minCombMax;
            tipListInfo.NumOfTipps        = tipItemDict.Count;
            tipListInfo.PathCount         = pathCount;
            tipListInfo.RowCount          = rowCount;
            tipListInfo.MultiWayOddFactor = multiWayOddVal;

            if (tipItems.Count > 0 && tipItems[0] != null && tipItems[0].Match != null)
            {
                if (!tipItems[0].Match.IsLiveBet)
                {
                    //Use manipulationFee only on Sport Bet, not on Live Bet according to Harri 2010-02-22 GMU
                    tipListInfo.ManipulationFeePercentage =
                        LimitHandling.ManipulationFeePercentage(tipListInfo.NumOfTipps);
                    tipListInfo.BonusFactor = LimitHandling.CombiBetSuperBonus(bonusTipsCount);
                }
                else
                {
                    // ale 14.07.2011: use manipulationfee also on livebet
                    tipListInfo.ManipulationFeePercentage =
                        LimitHandling.ManipulationFeeLivebetPercentage(tipListInfo.NumOfTipps);
                    tipListInfo.BonusFactor = 1;
                }
            }
            else
            {
                tipListInfo.ManipulationFeePercentage = 0;
                tipListInfo.BonusFactor = 1;
            }
            switch (ticketState)
            {
            case TicketStates.Single:
                UpdateSingleticketItems(ref tipListInfo, tipItems);
                break;

            case TicketStates.Combi:
                tipListInfo.FullOddFactor = oddVal * multiWayOddVal * tipListInfo.BonusFactor;
                if (tipListInfo.FullOddFactor >= MaxOdd)
                {
                    tipListInfo.IsMaxOddBet = true;
                    if (tipListInfo.FullOddFactor > MaxOdd)
                    {
                        tipListInfo.IllegalOddFactor = tipListInfo.FullOddFactor;
                    }
                    tipListInfo.FullOddFactor = MaxOdd;
                    tipListInfo.OddOfTipps    = MaxOdd;
                }
                else
                {
                    tipListInfo.OddOfTipps       = oddVal * multiWayOddVal;
                    tipListInfo.IllegalOddFactor = 0;
                    tipListInfo.IsMaxOddBet      = false;
                }
                tipListInfo.MinBet = MinStakeCombiBet;
                tipListInfo.MaxBet = Math.Round(LimitHandling.CombiMaxStake(tipListInfo.FullOddFactor * (100 - tipListInfo.ManipulationFeePercentage) / 100, tipItems.Count) * rowCount, 1);

                tipListInfo.MinWin = tipListInfo.FullOddFactor * tipListInfo.MinBet / rowCount * (100 - tipListInfo.ManipulationFeePercentage) / 100;
                tipListInfo.MaxWin = tipListInfo.FullOddFactor * tipListInfo.MaxBet / rowCount * (100 - tipListInfo.ManipulationFeePercentage) / 100;

                tipListInfo.PossWin = (tipListInfo.FullOddFactor * tipListInfo.Bet / rowCount * (100 - tipListInfo.ManipulationFeePercentage) / 100);

                tipListInfo.NumOfBets = 1;
                if ((tipListInfo.BonusFactor < 0.999m || tipListInfo.BonusFactor > 1.001m)
                    )
                {
                    tipListInfo.BonusDesc = "!TERMINAL_BONUS!";
                }

                break;

            case TicketStates.System:
                tipListInfo.BonusFactor      = 1;
                tipListInfo.FullOddFactor    = 0;                      //TODO: Calc system
                tipListInfo.IllegalOddFactor = 0;

                int ind = 0;
                TicketError = TicketError.NoError;
                if (!LimitHandling.SystemBetYAllowed(tipListInfo.NumSystemY))
                {                          //avoid useless time and memory consuming calculations
                    tipListInfo.ResetNumXY();
                    tipListInfo.NumOfBets          = 0;
                    tipListInfo.MinBet             = 0;
                    tipListInfo.OddOfTipps         = 0;
                    tipListInfo.MaxBet             = 0;
                    tipListInfo.MinWin             = 0;
                    tipListInfo.MaxWin             = 0;
                    tipListInfo.EnableSystemAddBtn = false;
                    tipListInfo.EnableSystemSubBtn = false;
                    return;
                }


                if (reset)
                {
                    tipListInfo.ResetNumXY();
                }

                tipListInfo.EnableSystemAddBtn = tipListInfo.NumSystemX < tipListInfo.NumSystemY - 1;
                tipListInfo.EnableSystemSubBtn = minCombMax <tipListInfo.NumSystemX + pathCount && tipListInfo.NumSystemX> TipListInfo.MinSystemX;


                decimal[] oddVals        = new decimal[tipListInfo.NumSystemY];
                bool      disableBankBtn = tipListInfo.PathCount + TipListInfo.MinSystemY >= tipListInfo.NumOfTipps;

                foreach (TipItem t in tipItems)
                {
                    if (!t.IsBank && t.Odd != null)
                    {
                        if (ind < oddVals.Length)
                        {
                            oddVals[ind++] = t.Odd.Value;
                        }
                        else
                        {
                            //_logger.Error("System Y value smaller as expected");


                            t.EnableBankBtn = !disableBankBtn;
                        }
                    }
                }
                tipListInfo.NumOfBets = (decimal)MathNet.Numerics.Fn.BinomialCoefficient(tipListInfo.NumSystemY, tipListInfo.NumSystemX) * tipListInfo.RowCount;
                decimal maxOdd = Nbt.Common.Odd.OddUtilities.AllCombinationsSum(oddVals, tipListInfo.NumSystemX);
                if (oddVals.Length < tipListInfo.NumSystemX)
                {                        //GMU 2011-02-01 fixed wrong || statement
                    string msg = ("in UpdateSystemOfCombiTicket reset=" + reset + " OddVals.Length: " + oddVals.Length + " smaller than " + tipListInfo.NumSystemX);
                    //_logger.Debug(msg);
                    //NbtLogSr.WriteNbtLogEntry(msg, NBTLogBO.PRIORITY_MEDIUM, StationSettings.GetSettings.StationNumber, NBTLogBO.MSG_TERMINAL);
                    return;
                }
                decimal minOdd = Nbt.Common.Odd.OddUtilities.MinCombinationsSum(oddVals, tipListInfo.NumSystemX);
                if (!LimitHandling.SystemBetOddAllowed(maxOdd, tipListInfo.MultiWayOddFactor, tipListInfo.RowCount))
                {
                    throw new Exception(TicketError.SystemItemsRangeError.ToString());
                }
                else
                {
                    //ViewControl.SetTicketErrorMessage(TicketError.NoError);
                    tipListInfo.MinBet = MinStakeSystemBet;
                    //tipListInfo.MaxBet = StationSettings.Station.MaxStakeSystemBet;
                    tipListInfo.OddOfTipps = maxOdd;
                    tipListInfo.MaxBet     = LimitHandling.SystemMaxStake(maxOdd * tipListInfo.MultiWayOddFactor) * tipListInfo.RowCount;

                    tipListInfo.MinWin  = tipListInfo.MinBet * maxOdd * tipListInfo.MultiWayOddFactor / tipListInfo.RowCount;
                    tipListInfo.MaxWin  = tipListInfo.MaxBet * maxOdd * tipListInfo.MultiWayOddFactor / tipListInfo.RowCount;
                    tipListInfo.PossWin = tipListInfo.Bet * maxOdd * tipListInfo.MultiWayOddFactor / tipListInfo.RowCount;
                }
                tipListInfo.FullOddFactor = maxOdd;
                tipListInfo.OddOfTipps    = maxOdd;

                break;
            }

            if (tipListInfo.ManipulationFeePercentage > 0)
            {
                tipListInfo.ManipulationFeeDesc = BetDomainSr.ManipulationFeeString + " " + String.Format("{0:F2}%", tipListInfo.ManipulationFeePercentage);
            }
            //ViewControl.UpdateBetNowButton();TODO: Removed by GMU 2008-09-04 because of beeing redundant
        }