本文整理汇总了C#中ITicketHelper.GetSportNameById方法的典型用法代码示例。如果您正苦于以下问题:C# ITicketHelper.GetSportNameById方法的具体用法?C# ITicketHelper.GetSportNameById怎么用?C# ITicketHelper.GetSportNameById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITicketHelper
的用法示例。
在下文中一共展示了ITicketHelper.GetSportNameById方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildChoice
protected override void BuildChoice(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
{
base.BuildChoice(ticket, ticketHelper, ticketData);
var betTypeName = GetBetTypeName(ticket.BetTypeId, ticketHelper);
var ticketDetails = GetTicketReference(ticket, ticketData);
var choiceDetails = string.Format("<div id='parlay_{0}' style='display:none;'>", ticket.RefNo);
if (ticketDetails.Count > 0 && IsNotRunningTicket(ticket))
{
int count = 1;
foreach (var ticketDetail in ticketDetails)
{
var odds = ConvertByBetType.Odds(ticketDetail.Odds, ticket.BetTypeId, ticket.OddsType);
var betTeam = string.Format(BetTeamFormat, ticketHelper.GetResourceData(GetResourceId(), ticketDetail.BetTeam), odds);
var league = string.Format(LeagueFormat, ticketHelper.GetSportNameById(ticket.SportTypeId), betTypeName, GetBetChoice(ticketDetail.TransDesc));
choiceDetails += string.Format("<div class='ticketList'>{0}{1}</div>", betTeam, league);
if (count++ < ticketDetails.Count)
{
choiceDetails += "<div class='line'></div>";
}
}
}
else
{
choiceDetails += string.Format("<div class='no-details'>{0}</div>", CoreBetList.ThereIsNoTicketDetailAvailable);
}
choiceDetails += "</div>";
Template.League.SetValue(Template.League.ToString() + choiceDetails);
}
示例2: RenderRTF
public override List<IRichTextString> RenderRTF(
ITicket ticket,
ITicketHelper ticketHelper,
List<ITicketData> ticketData,
bool isShowScoreMap,
RTFHelper rtfHelper)
{
Render(ticket, ticketHelper, ticketData, isShowScoreMap);
RTFHelper tmpRtfHelper = rtfHelper.Clone();
var betTypeName = GetBetTypeName(ticket.BetTypeId, ticketHelper);
tmpRtfHelper.RTFRenderer.AddText(string.Format("{0} {1}", Template.League.sportTypeName, betTypeName));
var ticketDetails = GetTicketReference(ticket, ticketData);
foreach (var ticketDetail in ticketDetails)
{
var odds = ConvertByBetType.Odds(ticketDetail.Odds, ticket.BetTypeId, ticket.OddsType);
var betTeam = ticketHelper.GetResourceData(GetResourceId(), ticketDetail.BetTeam);
var league = string.Format("{0} {1} {2}", ticketHelper.GetSportNameById(ticket.SportTypeId), betTypeName, GetBetChoice(ticketDetail.TransDesc));
tmpRtfHelper.RTFRenderer.AddText("\n");
tmpRtfHelper.RTFRenderer.AddText(string.Format("{0} @ {1}", betTeam, odds), rtfHelper.PosFont);
tmpRtfHelper.RTFRenderer.AddText("\n");
tmpRtfHelper.RTFRenderer.AddText(league, rtfHelper.NormalFont);
}
var choice = tmpRtfHelper.RTFRenderer.Render();
tmpRtfHelper.RTFRenderer.Clear();
return new List<IRichTextString>() { choice };
}
示例3: BuildSport
/// <summary>
/// Builds the sport.
/// </summary>
/// <param name="ticket">The ticket.</param>
/// <param name="ticketHelper">The ticket helper.</param>
protected virtual void BuildSport(ITicket ticket, ITicketHelper ticketHelper)
{
if (Template.League == null)
{
return;
}
Template.League.sportTypeName = ticketHelper.GetSportNameById(ticket.SportTypeId);
}
示例4: BuildLeague
protected override void BuildLeague(ITicket ticket, ITicketHelper ticketHelper)
{
Template.League.sportTypeName = ticketHelper.GetSportNameById(ticket.SportTypeId);
}