当前位置: 首页>>代码示例>>C#>>正文


C# ITicketHelper.GetTeamNameById方法代码示例

本文整理汇总了C#中ITicketHelper.GetTeamNameById方法的典型用法代码示例。如果您正苦于以下问题:C# ITicketHelper.GetTeamNameById方法的具体用法?C# ITicketHelper.GetTeamNameById怎么用?C# ITicketHelper.GetTeamNameById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITicketHelper的用法示例。


在下文中一共展示了ITicketHelper.GetTeamNameById方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BuildBetTeam

#pragma warning disable 1587
        /// <summary>
        /// Set bet team to template by ticket bet team pattern with following rules:
        /// <para>ho: Home and Over, hu: Home and Under</para>
        /// <para>ao: Away and Over, au: Away and Under</para>
        /// <para>do: Draw and Over, du: Draw and Over</para>
        /// </summary>
        /// <param name="ticket"> Ticket with bet type id is 143.</param>
        /// <param name="ticketHelper"> Not null ticket helper.</param>
        /// <param name="ticketData"> Not need this.</param>
#pragma warning restore 1587
        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var teamName = string.Empty;

            // Bet team pattern length is always 2
            if (ticket.BetTeam.Length == 2)
            {
                switch (ticket.BetTeam[0])
                {
                    case 'h':
                        teamName = ticketHelper.GetTeamNameById(ticket.HomeId);
                        break;

                    case 'a':
                        teamName = ticketHelper.GetTeamNameById(ticket.AwayId);
                        break;

                    case 'd':
                        teamName = CoreBetList.draw;
                        break;
                }

                var resultOverUnder = (ticket.BetTeam[1].ToString(CultureInfo.InvariantCulture) == BetTeamValue.O)
                    ? CoreBetList.over
                    : CoreBetList.under;

                Template.betTeam = string.Join(" & ", new string[] { teamName, resultOverUnder });
            }
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:40,代码来源:Choice143.cs

示例2: GetHomeTeamName

        protected virtual string GetHomeTeamName(ITicket ticket, ITicketHelper ticketHelper)
        {
            string homeTeamName = ticketHelper.GetTeamNameById(ticket.HomeId);
            string neutral = string.Format(" {0} ", CoreBetList.Neutral);
            homeTeamName = string.Join(null, new string[] { homeTeamName, ticket.IsNeutral ? neutral : string.Empty });

            return homeTeamName;
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:8,代码来源:Choice1.cs

示例3: BuildMatch

        /// <summary>
        /// Builds the match.
        /// </summary>
        /// <param name="ticket">The ticket.</param>
        /// <param name="ticketHelper">The ticket helper.</param>
        protected override void BuildMatch(ITicket ticket, ITicketHelper ticketHelper)
        {
            string homeName = GetHomeTeamName(ticket, ticketHelper);
            string awayName = ticketHelper.GetTeamNameById(ticket.AwayId);

            Template.Match.homeTeam = homeName;
            Template.Match.home_firstGoal_lastGoal = string.Empty;
            Template.Match.awayTeam = awayName;
            Template.Match.away_firstGoal_lastGoal = string.Empty;

            BuildFGLGLabel(ticket.EventStatus, ref Template.Match.home_firstGoal_lastGoal, ref Template.Match.away_firstGoal_lastGoal);
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:17,代码来源:Choice121.cs

示例4: BuildBetTeam

        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var bettypeTime = GetBetTypeTime(ticket);

            if (string.IsNullOrWhiteSpace(bettypeTime))
            {
                Template.betTeam = string.Empty;

                return;
            }

            var betTeamName = ticketHelper.GetResourceData(GetResourceId(), GetBetChoice(ticket));
            var bettypeTimes = bettypeTime.Split(',');
            var teamName = ticketHelper.GetTeamNameById(bettypeTimes[0]);

            Template.betTeam = string.Format("{0} {1} {2}%", teamName, betTeamName, bettypeTimes[1]);
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:17,代码来源:Choice805.cs

示例5: BuildMatch

        protected override void BuildMatch(ITicket ticket, ITicketHelper ticketHelper)
        {
            if (Template.Match == null)
            {
                return;
            }

            Template.Match.homeTeam = GetHomeTeamName(ticket, ticketHelper);
            Template.Match.awayTeam = ticketHelper.GetTeamNameById(ticket.AwayId);

            Template.Match.home_firstGoal_lastGoal = string.Empty;
            Template.Match.away_firstGoal_lastGoal = string.Empty;
            BuildFGLGLabel(ticket.EventStatus, ref Template.Match.home_firstGoal_lastGoal, ref Template.Match.away_firstGoal_lastGoal);
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:14,代码来源:Choice1.cs

示例6: BuildBetTeam

        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var awayTeamName = ticketHelper.GetTeamNameById(ticket.AwayId);
            var homeTeamName = GetHomeTeamName(ticket, ticketHelper);

            var isBetHomeTeam = IsBetHomeTeam(ticket);
            Template.betTeam = isBetHomeTeam ? homeTeamName : awayTeamName;
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:8,代码来源:Choice1.cs

示例7: BuildBetTeam

        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var teamId = ticket.HomeId == 0 ? ticket.AwayId : ticket.HomeId;

            Template.betTeam = ticketHelper.GetTeamNameById(teamId);
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:6,代码来源:Choice10.cs


注:本文中的ITicketHelper.GetTeamNameById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。