本文整理汇总了C#中ITicketHelper.GetParlayDetailById方法的典型用法代码示例。如果您正苦于以下问题:C# ITicketHelper.GetParlayDetailById方法的具体用法?C# ITicketHelper.GetParlayDetailById怎么用?C# ITicketHelper.GetParlayDetailById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITicketHelper
的用法示例。
在下文中一共展示了ITicketHelper.GetParlayDetailById方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderRTF
/// <summary>
/// Renders the RTF.
/// </summary>
/// <param name="ticket">The ticket.</param>
/// <param name="ticketHelper">The ticket helper.</param>
/// <param name="ticketData">The ticket data.</param>
/// <param name="isShowScoreMap">If set to <c>true</c> [is show score map].</param>
/// <param name="rtfHelper">The rich text rendering helper.</param>
/// <returns>
/// Choice_Template object.
/// </returns>
public override List<IRichTextString> RenderRTF(
ITicket ticket,
ITicketHelper ticketHelper,
List<ITicketData> ticketData,
bool isShowScoreMap,
RTFHelper rtfHelper)
{
List<IRichTextString> lstRTFChoices = new List<IRichTextString>();
RTFHelper tmpRtfHelper = rtfHelper.Clone();
tmpRtfHelper.RTFRenderer.AddText(CoreBetList.lblMixParlay, tmpRtfHelper.PosFont);
if (ticketHelper.GetParlayDetailById != null)
{
IList<ITicket> parlayData = ticketHelper.GetParlayDetailById(ticket.TransId);
bool showOdds = ticketHelper.IsShowOddsWithChoice;
ticketHelper.IsShowOddsWithChoice = true;
IFont pos, normal;
foreach (ITicket tkt in parlayData)
{
IChoice choiceBuilder = CreateChoiceBuilder(tkt.BetTypeId);
Template = choiceBuilder.Render(tkt, ticketHelper, null, isShowScoreMap);
var choiceData = BuildRTFChoice(tkt, rtfHelper, ticketHelper);
List<IRichTextString> tmpRtfChoice;
if (choiceData is List<IRichTextString>)
{
tmpRtfChoice = (List<IRichTextString>)choiceData;
}
else
{
tmpRtfChoice = new List<IRichTextString>() { (IRichTextString)choiceData };
}
if ((tkt.StatusId != null && tkt.StatusId.ToString().Trim() == BetStatusId.Void) || (tkt.Status != null && tkt.Status.Trim().ToLower() == BetStatus.Void))
{
pos = tmpRtfHelper.PosFontCrossed;
normal = tmpRtfHelper.NormalFontCrossed;
}
else
{
pos = tmpRtfHelper.PosFont;
normal = tmpRtfHelper.NormalFont;
}
CombineSubRichTextString(tmpRtfChoice, ref tmpRtfHelper, pos, normal);
}
ticketHelper.IsShowOddsWithChoice = showOdds;
}
var choice = tmpRtfHelper.RTFRenderer.Render();
tmpRtfHelper.RTFRenderer.Clear();
return new List<IRichTextString>() { choice };
}