コード例 #1
0
        public TipItem(int id, string opponents, string tiptext, OddSr odd, MatchSr match, string headline, int headlineSize)
        {
            //set class variables
            ID               = id;
            Opponents        = opponents;       //==match.DisplayShortName
            FormattedTipText = tiptext;         //==odd.DisplayName ==matchbo.DisplayOddName ==betdomain+odd
            this.Odd         = odd;
            this.Match       = match;

            if (odd != null && odd.BetDomain != null && odd.BetDomain.MinCombination > 0)
            {
                FormattedMincombination = odd.BetDomain.MinCombination.ToString();
            }
            else
            {
                FormattedMincombination = String.Empty;
            }
            //für Ticket:
            if (match != null)
            {
                //this.opponentsLongSingleLine = match.DisplayName.Replace("\n   ", String.Empty);
                OpponentsLongSingleLine = opponents;
                FormattedDate           = DateTimeUtils.DisplayDateTime(match.StartDate, new CultureInfo("En"));
            }
            if (OpponentsLongSingleLine == null)
            {
                OpponentsLongSingleLine = String.Empty;
            }
            if (FormattedDate == null)
            {
                FormattedDate = String.Empty;
            }
            if (odd != null && odd.BetDomain != null)
            {
                FormattedBetDomain = odd.BetDomain.DisplayName;
                FormattedOdd       = odd.TextLangStr;
            }
            if (FormattedBetDomain == null)
            {
                FormattedBetDomain = String.Empty;
            }
            if (FormattedOdd == null)
            {
                FormattedOdd = String.Empty;
            }

            Headline     = headline;
            HeadlineSize = headlineSize;
            Spacer       = 0;
        }
コード例 #2
0
ファイル: DataBinding.cs プロジェクト: litfung/Sport-Betting
        private static int minCombinationOfAll(TipItem item)
        {
            int minComb = 0;

            if (item != null && item.Odd != null && item.Odd.BetDomain != null)
            {
                minComb = item.Odd.BetDomain.MinCombination;
                MatchSr curMatch = item.Odd.BetDomain.Match;
                if (curMatch != null && curMatch.MinCombination > minComb)
                {
                    minComb = curMatch.MinCombination;
                }
            }
            return(minComb);
        }
コード例 #3
0
        /// <summary>
        /// checks the mincombination on Match and betDomain and checks, which mincombination is larger
        /// is called by LimitHandling.MinCombinationReachedForAllBetDomains
        /// </summary>
        /// <param name="pBetDomain">the betDomain to check</param>
        /// <returns>the largest mincombination</returns>
        public static int MinCombination(BetDomainSr pBetDomain)
        {
            int     result    = pBetDomain.MinCombination;
            MatchSr tempMatch = pBetDomain.Match;

            if (result < tempMatch.MinCombination)
            {
                result = tempMatch.MinCombination;
            }
            ///Removed check for MinCombi in Tournament which is not used any more

            ///g GMA: 20.02.2008 no FranchisorToTournamentFactory on client
            //FranchisorToTournament tempF2T = FranchisorToTournamentFactory.LoadFranchisorToTournamentByQuery(" TournamentID = " + tempTournament.ORMID + " and FranchisorID = " + stationSr.Franchisor2Station.ORMID, null);
            //if (tempF2T != null)
            //{
            //    if (result < tempF2T.MinCombination)
            //    {
            //        result = tempF2T.MinCombination;
            //    }
            //}
            return(result);
        }
コード例 #4
0
ファイル: DataBinding.cs プロジェクト: litfung/Sport-Betting
        public static TipItem AddTipData(string opponents, string tiptext, OddSr odd, MatchSr match, bool isBank)
        {
            // To be ensure that duplicated Ticket Tip will not be added
            if (DataBinding.FindTipDataBySvrOddId((int)odd.SvrOddID) != null)
            {
                return(null);
            }

            //new instance of tip item
            TipItem tip = new TipItem(_tipItems.Count, opponents, tiptext, odd, match, String.Empty, 0);

            tip.IsBank = addBank(odd);
            int index = 0;

            _tipItems.Insert(index, tip);
            //AfterTipItemsChanged();//Removed by GMU 11.07.2008 because of possibly being redundant
            //handle the animation for showing/hiding of menu and tiplist
            return(tip);
        }
コード例 #5
0
ファイル: DataBinding.cs プロジェクト: litfung/Sport-Betting
 public static TipItem AddTipData(string opponents, string tiptext, OddSr odd, MatchSr match)
 {
     return(AddTipData(opponents, tiptext, odd, match, false));
 }